From 27688d143bdce2b99216c80b99c285b4b0c827f3 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Tue, 7 Jul 2020 19:59:32 -0400 Subject: [PATCH 1/2] Fix dockerfilelint -c option usage dockerfilelint's "-c" option expects the folder *containing* the DOCKER_LINTER_RULES file --- lib/linter.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/linter.sh b/lib/linter.sh index 991908df..b0836e95 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1176,7 +1176,8 @@ if [ "$VALIDATE_DOCKER" == "true" ]; then # Lint the docker files # ######################### # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "DOCKER" "/dockerfilelint/bin/dockerfilelint" "/dockerfilelint/bin/dockerfilelint -c $DOCKER_LINTER_RULES" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKER[@]}" + # NOTE: dockerfilelint's "-c" option expects the folder *containing* the DOCKER_LINTER_RULES file + LintCodebase "DOCKER" "/dockerfilelint/bin/dockerfilelint" "/dockerfilelint/bin/dockerfilelint -c $(dirname $DOCKER_LINTER_RULES)" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKER[@]}" fi ################### From 1da8c13a40b832bbbfd270566b54489bd2cadee8 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 8 Jul 2020 08:02:14 -0500 Subject: [PATCH 2/2] seems to be the simplier path --- lib/linter.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index b0836e95..30c0dd54 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -54,8 +54,7 @@ TYPESCRIPT_STANDARD_LINTER_RULES='' # ENV st ANSIBLE_FILE_NAME='.ansible-lint.yml' # Name of the file ANSIBLE_LINTER_RULES="$DEFAULT_RULES_LOCATION/$ANSIBLE_FILE_NAME" # Path to the Ansible lint rules # Docker Vars -DOCKER_FILE_NAME='.dockerfilelintrc' # Name of the file -DOCKER_LINTER_RULES="$DEFAULT_RULES_LOCATION/$DOCKER_FILE_NAME" # Path to the Docker lint rules +DOCKER_LINTER_RULES="$DEFAULT_RULES_LOCATION" # Path to the Docker lint rules # Golang Vars GO_FILE_NAME='.golangci.yml' # Name of the file GO_LINTER_RULES="$DEFAULT_RULES_LOCATION/$GO_FILE_NAME" # Path to the Go lint rules @@ -1177,7 +1176,7 @@ if [ "$VALIDATE_DOCKER" == "true" ]; then ######################### # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" # NOTE: dockerfilelint's "-c" option expects the folder *containing* the DOCKER_LINTER_RULES file - LintCodebase "DOCKER" "/dockerfilelint/bin/dockerfilelint" "/dockerfilelint/bin/dockerfilelint -c $(dirname $DOCKER_LINTER_RULES)" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKER[@]}" + LintCodebase "DOCKER" "/dockerfilelint/bin/dockerfilelint" "/dockerfilelint/bin/dockerfilelint -c $DOCKER_LINTER_RULES" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKER[@]}" fi ###################