diff --git a/.automation/cleanup-docker.sh b/.automation/cleanup-docker.sh index 889c4d65..3115fa84 100755 --- a/.automation/cleanup-docker.sh +++ b/.automation/cleanup-docker.sh @@ -13,6 +13,12 @@ # - System with Docker installed # - Global variables met +######################### +# Source Function Files # +######################### +# shellcheck source=/dev/null +source ../lib/log.sh # Source the function script(s) + ########### # Globals # ########### @@ -29,11 +35,9 @@ DOCKERFILE_PATH="${DOCKERFILE_PATH}" # Path to the Dockerfile to be uploaded ################################################################################ #### Function Header ########################################################### Header() { - echo "" - echo "-------------------------------------------------------" - echo "----- GitHub Actions remove image from DockerHub ------" - echo "-------------------------------------------------------" - echo "" + info "-------------------------------------------------------" + info "----- GitHub Actions remove image from DockerHub ------" + info "-------------------------------------------------------" } ################################################################################ #### Function ValidateInput #################################################### @@ -42,21 +46,18 @@ ValidateInput() { ################ # Print header # ################ - echo "" - echo "----------------------------------------------" - echo "Gathering variables..." - echo "----------------------------------------------" - echo "" + info "----------------------------------------------" + info "Gathering variables..." + info "----------------------------------------------" ############################ # Validate GITHUB_WORKSPACE # ############################ if [ -z "${GITHUB_WORKSPACE}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GITHUB_WORKSPACE]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GITHUB_WORKSPACE}]${NC}" - exit 1 + error "Failed to get [GITHUB_WORKSPACE]!" + fatal "[${GITHUB_WORKSPACE}]" else - echo "Successfully found:[GITHUB_WORKSPACE], value:[${GITHUB_WORKSPACE}]" + info "Successfully found:[GITHUB_WORKSPACE], value:[${GITHUB_WORKSPACE}]" fi ####################### @@ -64,15 +65,14 @@ ValidateInput() { ####################### if [ -z "${IMAGE_REPO}" ]; then # No repo was pulled - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [IMAGE_REPO]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${IMAGE_REPO}]${NC}" - exit 1 + error "Failed to get [IMAGE_REPO]!" + fatal "[${IMAGE_REPO}]" elif [[ ${IMAGE_REPO} == "github/super-linter" ]]; then # Found our main repo - echo "Successfully found:[IMAGE_REPO], value:[${IMAGE_REPO}]" + info "Successfully found:[IMAGE_REPO], value:[${IMAGE_REPO}]" else # This is a fork and we cant pull vars or any info - echo -e "${NC}${F[Y]}WARN!${NC} No image to cleanup as this is a forked branch, and not being built with current automation!${NC}" + warn "No image to cleanup as this is a forked branch, and not being built with current automation!" exit 0 fi @@ -80,33 +80,30 @@ ValidateInput() { # Validate IMAGE_VERSION # ########################## if [ -z "${IMAGE_VERSION}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [IMAGE_VERSION]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${IMAGE_VERSION}]${NC}" - exit 1 + error "Failed to get [IMAGE_VERSION]!" + fatal "[${IMAGE_VERSION}]" else - echo "Successfully found:[IMAGE_VERSION], value:[${IMAGE_VERSION}]" + info "Successfully found:[IMAGE_VERSION], value:[${IMAGE_VERSION}]" fi ############################ # Validate DOCKER_USERNAME # ############################ if [ -z "${DOCKER_USERNAME}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [DOCKER_USERNAME]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${DOCKER_USERNAME}]${NC}" - exit 1 + error "Failed to get [DOCKER_USERNAME]!" + fatal "[${DOCKER_USERNAME}]" else - echo "Successfully found:[DOCKER_USERNAME], value:[${DOCKER_USERNAME}]" + info "Successfully found:[DOCKER_USERNAME], value:[${DOCKER_USERNAME}]" fi ############################ # Validate DOCKER_PASSWORD # ############################ if [ -z "${DOCKER_PASSWORD}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [DOCKER_PASSWORD]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${DOCKER_PASSWORD}]${NC}" - exit 1 + error "Failed to get [DOCKER_PASSWORD]!" + fatal "[${DOCKER_PASSWORD}]" else - echo "Successfully found:[DOCKER_PASSWORD], value:[********]" + info "Successfully found:[DOCKER_PASSWORD], value:[********]" fi ################################################## @@ -121,10 +118,9 @@ ValidateInput() { ############################################# # Image is 'latest' and we will not destroy # ############################################# - echo "Image Tag is set to:[latest]..." - echo "We will never destroy latest..." - echo "Bye!" - exit 1 + error "Image Tag is set to:[latest]..." + error "We will never destroy latest..." + fatal "Bye!" fi } ################################################################################ @@ -133,11 +129,9 @@ LoginToDocker() { ################ # Print header # ################ - echo "" - echo "----------------------------------------------" - echo "Login to DockerHub..." - echo "----------------------------------------------" - echo "" + info "----------------------------------------------" + info "Login to DockerHub..." + info "----------------------------------------------" ###################### # Login to DockerHub # @@ -154,12 +148,11 @@ LoginToDocker() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # ERROR - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to authenticate to DockerHub!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${LOGIN_CMD}]${NC}" - exit 1 + error "Failed to authenticate to DockerHub!" + fatal "[${LOGIN_CMD}]" else # SUCCESS - echo "Successfully authenticated to DockerHub!" + info "Successfully authenticated to DockerHub!" fi } ################################################################################ @@ -168,11 +161,9 @@ RemoveImage() { ################ # Print header # ################ - echo "" - echo "----------------------------------------------" - echo "Removing the DockerFile image:[${IMAGE_REPO}:${IMAGE_VERSION}]" - echo "----------------------------------------------" - echo "" + info "----------------------------------------------" + info "Removing the DockerFile image:[${IMAGE_REPO}:${IMAGE_VERSION}]" + info "----------------------------------------------" ##################################### # Create Token to auth to DockerHub # @@ -193,12 +184,11 @@ RemoveImage() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # ERROR - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to gain token from DockerHub!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${TOKEN}]${NC}" - exit 1 + error "Failed to gain token from DockerHub!" + fatal "[${TOKEN}]" else # SUCCESS - echo "Successfully gained auth token from DockerHub!" + info "Successfully gained auth token from DockerHub!" fi ################################# @@ -218,22 +208,19 @@ RemoveImage() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # ERROR - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to remove tag from DockerHub!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${REMOVE_CMD}]${NC}" - exit 1 + error "Failed to remove tag from DockerHub!" + fatal "[${REMOVE_CMD}]" else # SUCCESS - echo "Successfully [removed] Docker image tag:[${IMAGE_VERSION}] from DockerHub!" + info "Successfully [removed] Docker image tag:[${IMAGE_VERSION}] from DockerHub!" fi } ################################################################################ #### Function Footer ########################################################### Footer() { - echo "" - echo "-------------------------------------------------------" - echo "The step has completed" - echo "-------------------------------------------------------" - echo "" + info "-------------------------------------------------------" + info "The step has completed" + info "-------------------------------------------------------" } ################################################################################ ################################## MAIN ######################################## diff --git a/.automation/test/ansible/ghe-initialize/templates/ghe-config-apply.sh b/.automation/test/ansible/ghe-initialize/templates/ghe-config-apply.sh index 2d4b0eec..c7370032 100644 --- a/.automation/test/ansible/ghe-initialize/templates/ghe-config-apply.sh +++ b/.automation/test/ansible/ghe-initialize/templates/ghe-config-apply.sh @@ -28,17 +28,17 @@ CheckGHEPid() ################################## if [ ${PID_CHECK} -gt ${PID_CHECK_LIMIT} ]; then # Over the limit, move on - echo "We have checked the pid ${PID_CHECK} times, moving on..." + info "We have checked the pid ${PID_CHECK} times, moving on..." else ################################################ # Check to see if the PID is alive and running # ################################################ if [ ! -f "${GHE_CONFIG_PID}" ]; then # File not found - echo "We're good to move forward, no .pid file found at:[${GHE_CONFIG_PID}]" + info "We're good to move forward, no .pid file found at:[${GHE_CONFIG_PID}]" else # Found the pid running, need to sleep - echo "Current PID found, sleeping ${SLEEP_SECONDS} seconds before next check..." + info "Current PID found, sleeping ${SLEEP_SECONDS} seconds before next check..." ################ # Sleep it off # ################ @@ -53,9 +53,9 @@ CheckGHEPid() # Check the shell for errors # ############################## if [ ${ERROR_CODE} -ne 0 ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to sleep!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${SLEEP_CMD}]${NC}" - echo "Will try to call apply as last effort..." + error "Failed to sleep!" + error "[${SLEEP_CMD}]" + info "Will try to call apply as last effort..." #################################### # Call config apply as last effort # #################################### @@ -82,7 +82,7 @@ CheckGHEProcess() ################################## if [ ${PROCESS_CHECK} -gt ${PROCESS_CHECK_LIMIT} ]; then # Over the limit, move on - echo "We have checked the process ${PROCESS_CHECK} times, moving on..." + info "We have checked the process ${PROCESS_CHECK} times, moving on..." else #################################################### # Check to see if the process is alive and running # @@ -99,10 +99,10 @@ CheckGHEProcess() ############################## if [ ${ERROR_CODE} -ne 0 ]; then # No process running on the system - echo "Were good to move forward, no process like:[${GHE_APPLY_COMMAND}] running currently on the system" + info "Were good to move forward, no process like:[${GHE_APPLY_COMMAND}] running currently on the system" else # Found the process running, need to sleep - echo "Current process alive:[${CHECK_PROCESS_CMD}], sleeping ${SLEEP_SECONDS} seconds before next check..." + info "Current process alive:[${CHECK_PROCESS_CMD}], sleeping ${SLEEP_SECONDS} seconds before next check..." ################ # Sleep it off # ################ @@ -117,9 +117,9 @@ CheckGHEProcess() # Check the shell for errors # ############################## if [ ${ERROR_CODE} -ne 0 ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to sleep!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${SLEEP_CMD}]${NC}" - echo "Will try to call apply as last effort..." + error "Failed to sleep!" + error "[${SLEEP_CMD}]" + info "Will try to call apply as last effort..." #################################### # Call config apply as last effort # #################################### @@ -144,7 +144,7 @@ RunConfigApply() ########## # Header # ########## - echo "Running ${GHE_APPLY_COMMAND} to the server..." + info "Running ${GHE_APPLY_COMMAND} to the server..." ############################################## # Run the command to apply changes to server # @@ -161,12 +161,11 @@ RunConfigApply() ############################## if [ ${ERROR_CODE} -ne 0 ]; then # Errors - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to run config apply command!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${APPLY_CMD}]${NC}" - exit 1 + error "Failed to run config apply command!" + fatal "[${APPLY_CMD}]" else # Success - echo -e "${NC}${F[B]}Successfully ran ${F[C]}${GHE_APPLY_COMMAND}${NC}" + info "Successfully ran ${F[C]}${GHE_APPLY_COMMAND}" fi } ################################################################################ diff --git a/.automation/test/cfn/reports/expected-CFN.tap b/.automation/test/cfn/reports/expected-CFN.tap deleted file mode 100644 index 98466237..00000000 --- a/.automation/test/cfn/reports/expected-CFN.tap +++ /dev/null @@ -1,22 +0,0 @@ -TAP version 13 -1..8 -not ok 1 - cfn_bad_1.json - --- - message: E3001 Invalid or unsupported Type AWS Route53 HostedZonee for resource DNS in us-east-1\n/tmp/lint/.automation/test/cfn/cfn_bad_1.json 6 10\n - ... -not ok 2 - cfn_bad_2.yaml - --- - message: E3001 Invalid or unsupported Type AWS Route53 HostedZonee for resource DNS in us-east-1\n/tmp/lint/.automation/test/cfn/cfn_bad_2.yaml 5 5\n - ... -not ok 3 - cfn_bad_3.json - --- - message: E3002 Invalid Property Resources/myDNSRecord/Properties/Ttl\n/tmp/lint/.automation/test/cfn/cfn_bad_3.json 11 13\n - ... -not ok 4 - cfn_bad_4.yaml - --- - message: E3002 Invalid Property Resources/myDNSRecord/Properties/Ttl\n/tmp/lint/.automation/test/cfn/cfn_bad_4.yaml 9 7\n - ... -ok 5 - cfn_good_1.json -ok 6 - cfn_good_2.yaml -ok 7 - cfn_good_3.json -ok 8 - cfn_good_4.yaml diff --git a/.automation/test/cfn/README.md b/.automation/test/cloudformation/README.md similarity index 100% rename from .automation/test/cfn/README.md rename to .automation/test/cloudformation/README.md diff --git a/.automation/test/cfn/cfn_bad_1.json b/.automation/test/cloudformation/cloudformation_bad_1.json similarity index 100% rename from .automation/test/cfn/cfn_bad_1.json rename to .automation/test/cloudformation/cloudformation_bad_1.json diff --git a/.automation/test/cfn/cfn_bad_2.yaml b/.automation/test/cloudformation/cloudformation_bad_2.yaml similarity index 100% rename from .automation/test/cfn/cfn_bad_2.yaml rename to .automation/test/cloudformation/cloudformation_bad_2.yaml diff --git a/.automation/test/cfn/cfn_bad_3.json b/.automation/test/cloudformation/cloudformation_bad_3.json similarity index 100% rename from .automation/test/cfn/cfn_bad_3.json rename to .automation/test/cloudformation/cloudformation_bad_3.json diff --git a/.automation/test/cfn/cfn_bad_4.yaml b/.automation/test/cloudformation/cloudformation_bad_4.yaml similarity index 100% rename from .automation/test/cfn/cfn_bad_4.yaml rename to .automation/test/cloudformation/cloudformation_bad_4.yaml diff --git a/.automation/test/cfn/cfn_good_1.json b/.automation/test/cloudformation/cloudformation_good_1.json similarity index 100% rename from .automation/test/cfn/cfn_good_1.json rename to .automation/test/cloudformation/cloudformation_good_1.json diff --git a/.automation/test/cfn/cfn_good_2.yaml b/.automation/test/cloudformation/cloudformation_good_2.yaml similarity index 100% rename from .automation/test/cfn/cfn_good_2.yaml rename to .automation/test/cloudformation/cloudformation_good_2.yaml diff --git a/.automation/test/cfn/cfn_good_3.json b/.automation/test/cloudformation/cloudformation_good_3.json similarity index 100% rename from .automation/test/cfn/cfn_good_3.json rename to .automation/test/cloudformation/cloudformation_good_3.json diff --git a/.automation/test/cfn/cfn_good_4.yaml b/.automation/test/cloudformation/cloudformation_good_4.yaml similarity index 100% rename from .automation/test/cfn/cfn_good_4.yaml rename to .automation/test/cloudformation/cloudformation_good_4.yaml diff --git a/.automation/test/cloudformation/reports/expected-CLOUDFORMATION.tap b/.automation/test/cloudformation/reports/expected-CLOUDFORMATION.tap new file mode 100644 index 00000000..a92e9775 --- /dev/null +++ b/.automation/test/cloudformation/reports/expected-CLOUDFORMATION.tap @@ -0,0 +1,22 @@ +TAP version 13 +1..8 +not ok 1 - cloudformation_bad_1.json + --- + message: E3001 Invalid or unsupported Type AWS Route53 HostedZonee for resource DNS in us-east-1\n/tmp/lint/.automation/test/cloudformation/cloudformation_bad_1.json 6 10\n + ... +not ok 2 - cloudformation_bad_2.yaml + --- + message: E3001 Invalid or unsupported Type AWS Route53 HostedZonee for resource DNS in us-east-1\n/tmp/lint/.automation/test/cloudformation/cloudformation_bad_2.yaml 5 5\n + ... +not ok 3 - cloudformation_bad_3.json + --- + message: E3002 Invalid Property Resources/myDNSRecord/Properties/Ttl\n/tmp/lint/.automation/test/cloudformation/cloudformation_bad_3.json 11 13\n + ... +not ok 4 - cloudformation_bad_4.yaml + --- + message: E3002 Invalid Property Resources/myDNSRecord/Properties/Ttl\n/tmp/lint/.automation/test/cloudformation/cloudformation_bad_4.yaml 9 7\n + ... +ok 5 - cloudformation_good_1.json +ok 6 - cloudformation_good_2.yaml +ok 7 - cloudformation_good_3.json +ok 8 - cloudformation_good_4.yaml diff --git a/.automation/test/groovy/README.md b/.automation/test/groovy/README.md new file mode 100644 index 00000000..b08a3b4f --- /dev/null +++ b/.automation/test/groovy/README.md @@ -0,0 +1,13 @@ +# Groovy Test Cases +This folder holds the test cases for **Groovy**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/groovy/groovy_bad_01.groovy b/.automation/test/groovy/groovy_bad_01.groovy new file mode 100644 index 00000000..7d071754 --- /dev/null +++ b/.automation/test/groovy/groovy_bad_01.groovy @@ -0,0 +1,6 @@ +class Example { + static void main(String[] args) + File file = new File("E:/Example.txt") + The file ${file.absolutePath} has ${file.length()} bytes" + } +} diff --git a/.automation/test/groovy/groovy_good_01.groovy b/.automation/test/groovy/groovy_good_01.groovy new file mode 100644 index 00000000..d0375dab --- /dev/null +++ b/.automation/test/groovy/groovy_good_01.groovy @@ -0,0 +1,6 @@ +class Example { + static void main(String[] args) { + File file = new File("E:/Example.txt") + println "The file ${file.absolutePath} has ${file.length()} bytes" + } +} diff --git a/.automation/test/json/reports/expected-JSON.tap b/.automation/test/json/reports/expected-JSON.tap.ignored similarity index 100% rename from .automation/test/json/reports/expected-JSON.tap rename to .automation/test/json/reports/expected-JSON.tap.ignored diff --git a/.automation/test/lua/README.md b/.automation/test/lua/README.md new file mode 100644 index 00000000..db695378 --- /dev/null +++ b/.automation/test/lua/README.md @@ -0,0 +1,13 @@ +# Lua Test Cases +This folder holds the test cases for **Lua**. + +## Additional Docs +No Additional information is needed for this test case. + +## Good Test Cases +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. +- **Note:** They are linted utilizing the default linter rules. \ No newline at end of file diff --git a/.automation/test/lua/lua_bad_1.lua b/.automation/test/lua/lua_bad_1.lua new file mode 100644 index 00000000..2c31e39d --- /dev/null +++ b/.automation/test/lua/lua_bad_1.lua @@ -0,0 +1,9 @@ +package.loaded[...] = {} + +local function helper(...) + -- NYI +end + +function embrace(opt) + local opt = opt or "default" + return hepler(opt.."?") diff --git a/.automation/test/lua/lua_good_1.lua b/.automation/test/lua/lua_good_1.lua new file mode 100644 index 00000000..f7ade80b --- /dev/null +++ b/.automation/test/lua/lua_good_1.lua @@ -0,0 +1,12 @@ +local embracer = {} + +local function helper() + -- NYI wontfix +end + +function embracer.embrace(opt) + opt = opt or "default" + return helper(opt.."?") +end + +return embracer diff --git a/.automation/test/php/php_bad_2.php b/.automation/test/php/php_bad_2.php new file mode 100644 index 00000000..106fe977 --- /dev/null +++ b/.automation/test/php/php_bad_2.php @@ -0,0 +1,15 @@ + + */ +function takesAnInt(int $i) { + return [$i, "hello"]; +} + +$data = ["some text", 5]; +takesAnInt($data[0]); + +$condition = rand(0, 5); +iff ($condition) { +} elseif ($condition) {} diff --git a/.automation/test/php/php_good_2.php b/.automation/test/php/php_good_2.php new file mode 100644 index 00000000..35348ec0 --- /dev/null +++ b/.automation/test/php/php_good_2.php @@ -0,0 +1,25 @@ + + */ +function helloName(string $name): array +{ + return ["hello", $name]; +} + +function helloSuperLinter(): void +{ + $hello = helloName("Super-Linter"); + echo implode(" ", $hello) . PHP_EOL; +} + +function helloOrWorld(): void +{ + $random = rand(0, 10); + if ($random >= 5) { + echo "Hello"; + } else { + echo "World"; + } +} diff --git a/.automation/test/php/reports/expected-PHP.tap b/.automation/test/php/reports/expected-PHP.tap deleted file mode 100644 index 48408065..00000000 --- a/.automation/test/php/reports/expected-PHP.tap +++ /dev/null @@ -1,7 +0,0 @@ -TAP version 13 -1..2 -not ok 1 - php_bad_1.php - --- - message: PHP Parse error syntax error, unexpected 'pe98y' (T_STRING) in /tmp/lint/.automation/test/php/php_bad_1.php on line 3\nErrors parsing /tmp/lint/.automation/test/php/php_bad_1.php\n - ... -ok 2 - php_good_1.php diff --git a/.automation/test/php/reports/expected-PHP_BUILTIN.tap b/.automation/test/php/reports/expected-PHP_BUILTIN.tap new file mode 100644 index 00000000..beb3656e --- /dev/null +++ b/.automation/test/php/reports/expected-PHP_BUILTIN.tap @@ -0,0 +1,12 @@ +TAP version 13 +1..4 +not ok 1 - php_bad_1.php + --- + message: PHP Parse error syntax error, unexpected 'pe98y' (T_STRING) in /tmp/lint/.automation/test/php/php_bad_1.php on line 3\nErrors parsing /tmp/lint/.automation/test/php/php_bad_1.php\n + ... +not ok 2 - php_bad_2.php + --- + message: PHP Parse error syntax error, unexpected '}' in /tmp/lint/.automation/test/php/php_bad_2.php on line 15\nErrors parsing /tmp/lint/.automation/test/php/php_bad_2.php\n + ... +ok 3 - php_good_1.php +ok 4 - php_good_2.php diff --git a/.automation/test/php/reports/expected-PHP_PHPCS.tap.ignored b/.automation/test/php/reports/expected-PHP_PHPCS.tap.ignored new file mode 100644 index 00000000..bf7e541d --- /dev/null +++ b/.automation/test/php/reports/expected-PHP_PHPCS.tap.ignored @@ -0,0 +1,12 @@ +TAP version 13 +1..4 +not ok 1 - php_bad_1.php + --- + message: \nFILE /tmp/lint/.automation/test/php/php_bad_1.php\n----------------------------------------------------------------------\nFOUND 7 ERRORS AFFECTING 1 LINE\n----------------------------------------------------------------------\n 3 | ERROR | [x] Expected at least 1 space before "-"; 0 found\n 3 | ERROR | [x] Expected at least 1 space after "-"; 0 found\n 3 | ERROR | [x] Expected at least 1 space before "="; 0 found\n 3 | ERROR | [x] Expected at least 1 space after "="; 0 found\n 3 | ERROR | [x] Expected at least 1 space before "-"; 0 found\n 3 | ERROR | [x] Expected at least 1 space before "-"; 0 found\n 3 | ERROR | [x] Expected at least 1 space after "-"; 0 found\n----------------------------------------------------------------------\nPHPCBF CAN FIX THE 7 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n----------------------------------------------------------------------\n\n + ... +not ok 2 - php_bad_2.php + --- + message: \nFILE /tmp/lint/.automation/test/php/php_bad_2.php\n----------------------------------------------------------------------\nFOUND 4 ERRORS AND 1 WARNING AFFECTING 4 LINES\n----------------------------------------------------------------------\n 1 | WARNING | [ ] A file should declare new symbols (classes,\n | | functions, constants, etc.) and cause no other\n | | side effects, or it should execute logic with\n | | side effects, but should not do both. The first\n | | symbol is defined on line 6 and the first side\n | | effect is on line 10.\n 6 | ERROR | [x] Opening brace should be on a new line\n 14 | ERROR | [x] Space before opening parenthesis of function call\n | | prohibited\n 15 | ERROR | [x] Newline required after opening brace\n 15 | ERROR | [x] Closing brace must be on a line by itself\n----------------------------------------------------------------------\nPHPCBF CAN FIX THE 4 MARKED SNIFF VIOLATIONS AUTOMATICALLY\n----------------------------------------------------------------------\n\n + ... +ok 3 - php_good_1.php +ok 4 - php_good_2.php diff --git a/.automation/test/php/reports/expected-PHP_PHPSTAN.tap b/.automation/test/php/reports/expected-PHP_PHPSTAN.tap new file mode 100644 index 00000000..03f22dd1 --- /dev/null +++ b/.automation/test/php/reports/expected-PHP_PHPSTAN.tap @@ -0,0 +1,12 @@ +TAP version 13 +1..4 +not ok 1 - php_bad_1.php + --- + message: ------ ---------------------------------------------- \n Line php_bad_1.php \n ------ ---------------------------------------------- \n 3 Invalid numeric literal on line 3 \n 3 Invalid numeric literal on line 3 \n 3 Syntax error, unexpected '=' on line 3 \n 3 Syntax error, unexpected T_LNUMBER on line 3 \n 3 Syntax error, unexpected T_STRING on line 3 \n 3 Syntax error, unexpected T_STRING on line 3 \n ------ ---------------------------------------------- \n\n [ERROR] Found 6 errors \n + ... +not ok 2 - php_bad_2.php + --- + message: ------ ----------------------------------------- \n Line php_bad_2.php \n ------ ----------------------------------------- \n 15 Syntax error, unexpected '}' on line 15 \n ------ ----------------------------------------- \n\n [ERROR] Found 1 error \n + ... +ok 3 - php_good_1.php +ok 4 - php_good_2.php diff --git a/.automation/test/php/reports/expected-PHP_PSALM.tap.ignored b/.automation/test/php/reports/expected-PHP_PSALM.tap.ignored new file mode 100644 index 00000000..57baa89a --- /dev/null +++ b/.automation/test/php/reports/expected-PHP_PSALM.tap.ignored @@ -0,0 +1,12 @@ +TAP version 13 +1..4 +not ok 1 - php_bad_1.php + --- + message: Scanning files...\nAnalyzing files...\n\nE\n\nERROR ParseError - php/php_bad_1.php 3 2 - Syntax error, unexpected T_STRING on line 3 (see https //psalm.dev/173)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR UndefinedConstant - php/php_bad_1.php 3 2 - Const pe98y is not defined (see https //psalm.dev/020)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR UndefinedConstant - php/php_bad_1.php 3 8 - Const r is not defined (see https //psalm.dev/020)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR UndefinedConstant - php/php_bad_1.php 3 10 - Const n0u823n is not defined (see https //psalm.dev/020)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR ParseError - php/php_bad_1.php 3 17 - Syntax error, unexpected '=' on line 3 (see https //psalm.dev/173)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR UndefinedConstant - php/php_bad_1.php 3 18 - Const r is not defined (see https //psalm.dev/020)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR ParseError - php/php_bad_1.php 3 21 - Invalid numeric literal on line 3 (see https //psalm.dev/173)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR UndefinedConstant - php/php_bad_1.php 3 24 - Const u3 is not defined (see https //psalm.dev/020)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR UndefinedConstant - php/php_bad_1.php 3 28 - Const r08u2q098ry is not defined (see https //psalm.dev/020)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR ParseError - php/php_bad_1.php 3 40 - Syntax error, unexpected T_LNUMBER on line 3 (see https //psalm.dev/173)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR UndefinedConstant - php/php_bad_1.php 3 42 - Const nq2yr09n2yr9 is not defined (see https //psalm.dev/020)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR UndefinedConstant - php/php_bad_1.php 3 55 - Const y2n is not defined (see https //psalm.dev/020)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR ParseError - php/php_bad_1.php 3 61 - Syntax error, unexpected T_STRING on line 3 (see https //psalm.dev/173)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR UndefinedConstant - php/php_bad_1.php 3 61 - Const yr is not defined (see https //psalm.dev/020)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\nERROR UndefinedConstant - php/php_bad_1.php 3 68 - Const yr3 is not defined (see https //psalm.dev/020)\n2pe98y r-n0u823n=r 092u3- r08u2q098ry 09nq2yr09n2yr9 y2n-93yr 298yr3 29\n\n\n------------------------------\n15 errors found\n------------------------------\n\n + ... +not ok 2 - php_bad_2.php + --- + message: Scanning files...\nAnalyzing files...\n\nE\n\nERROR InvalidReturnType - php/php_bad_2.php 4 12 - The declared return type 'array' for takesAnInt is incorrect, got 'array{int, string(hello)}' (see https //psalm.dev/011)\n * @return array\n\n\nERROR InvalidReturnStatement - php/php_bad_2.php 7 12 - The inferred type 'array{int, string(hello)}' does not match the declared return type 'array' for takesAnInt (see https //psalm.dev/128)\n return [$i, "hello"];\n\n\nERROR InvalidScalarArgument - php/php_bad_2.php 11 12 - Argument 1 of takesAnInt expects int, string(some text) provided (see https //psalm.dev/012)\ntakesAnInt($data[0]);\n\n\nERROR ParseError - php/php_bad_2.php 15 1 - Syntax error, unexpected '}' on line 15 (see https //psalm.dev/173)\n} elseif ($condition) {}\n\n\n------------------------------\n4 errors found\n------------------------------\nPsalm can automatically fix 1 of these issues.\nRun Psalm again with \n--alter --issues=InvalidReturnType --dry-run\nto see what it can fix.\n------------------------------\n\n + ... +ok 3 - php_good_1.php +ok 4 - php_good_2.php diff --git a/.automation/test/python/python_good_1.py b/.automation/test/python/python_good_1.py index e894c36f..a2f7c3e6 100644 --- a/.automation/test/python/python_good_1.py +++ b/.automation/test/python/python_good_1.py @@ -3,9 +3,9 @@ from os import getenv, path from pprint import pprint import sys -import click # pylint: disable=import-error -from dotenv import load_dotenv # pylint: disable=import-error -import requests # pylint: disable=import-error +import click # pylint: disable=import-error +from dotenv import load_dotenv # pylint: disable=import-error +import requests # pylint: disable=import-error env = load_dotenv() api_url = getenv('API_URL', default='https://api.github.com/graphql') @@ -13,8 +13,8 @@ github_token = getenv("GITHUB_TOKEN", default=None) if github_token is None: sys.exit("GitHub Token is not set." + - "Please set the GITHUB_TOKEN env variable in your system or " + - "the .env file of your project.") + "Please set the GITHUB_TOKEN env variable in your system or " + + "the .env file of your project.") client_id = getenv('CLIENT_ID', default='copy_labels.py') headers = { @@ -23,6 +23,7 @@ headers = { 'Content-Type': 'application/json' } + def create_label(repo_id, label): """ Create label in the supplied repo. @@ -52,6 +53,7 @@ def create_label(repo_id, label): return response + def get_labels(owner, repo): """ Gets a list of labels from the supplied repo. @@ -62,7 +64,7 @@ def get_labels(owner, repo): :return: A tuple with the GitHub id for the repository and a list of labels defined in the repository """ - query_variables = { "owner": owner, "name": repo, } + query_variables = {"owner": owner, "name": repo, } with open(path.join(path.dirname(__file__), 'queries/get_repo_data.gql'), 'r') as query_file: query = "".join(query_file.readlines()) @@ -83,6 +85,7 @@ def get_labels(owner, repo): '[ERROR] getting issue labels. Status Code: {status_code} - Message: {result}'.format( status_code=status_code, result=result["message"])) + def delete_label(label_id): """ Delete the specified label @@ -106,6 +109,7 @@ def delete_label(label_id): return result + @click.command() @click.option('--dry', is_flag=True) @click.argument('source_repo') @@ -149,7 +153,8 @@ def copy_labels(source_repo, target_repo, dry): print('Done') + if __name__ == "__main__": # Pylint doesn't know that @click.command takes care of injecting the # function parameters. Disabling Pylint error. - copy_labels() # pylint: disable=no-value-for-parameter + copy_labels() # pylint: disable=no-value-for-parameter diff --git a/.automation/test/states/README.md b/.automation/test/states/README.md new file mode 100644 index 00000000..f2c3dfc3 --- /dev/null +++ b/.automation/test/states/README.md @@ -0,0 +1,19 @@ +# AWS States language Test Cases + +This folder holds the test cases for **AWS States Language**. + +## Additional Docs + +No Additional information is needed for this test case. + +## Good Test Cases + +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. + +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases + +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. + +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/states/reports/expected-STATES.tap.ignored b/.automation/test/states/reports/expected-STATES.tap.ignored new file mode 100644 index 00000000..e9be32b5 --- /dev/null +++ b/.automation/test/states/reports/expected-STATES.tap.ignored @@ -0,0 +1,7 @@ +TAP version 13 +1..2 +not ok 1 - json_bad_1.json + --- + message: Error Parse error on line 6 \n...ng" { "level" 'ignore', "space\n----------------------^\nExpecting 'STRING', 'NUMBER', 'NULL', 'TRUE', 'FALSE', '{', '[', got 'undefined'\n at Object.parseError (/node_modules/jsonlint/lib/jsonlint.js 55 11)\n at Object.parse (/node_modules/jsonlint/lib/jsonlint.js 132 22)\n at parse (/node_modules/jsonlint/lib/cli.js 82 14)\n at main (/node_modules/jsonlint/lib/cli.js 135 14)\n at Object. (/node_modules/jsonlint/lib/cli.js 179 1)\n at Module._compile (internal/modules/cjs/loader.js 1138 30)\n at Object.Module._extensions..js (internal/modules/cjs/loader.js 1158 10)\n at Module.load (internal/modules/cjs/loader.js 986 32)\n at Function.Module._load (internal/modules/cjs/loader.js 879 14)\n at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js 71 12)\n + ... +ok 2 - json_good_1.json diff --git a/.automation/test/states/states_bad_1.json b/.automation/test/states/states_bad_1.json new file mode 100644 index 00000000..36b15b64 --- /dev/null +++ b/.automation/test/states/states_bad_1.json @@ -0,0 +1,10 @@ +{ + "Comment": "A simple minimal example of the States language", + "StartAt": "Hello World", + "States": { + "Hello World": { + "Resource": "arn:aws:lambda:us-east-1:123456789012:function:HelloWorld", + "End": true + } + } +} diff --git a/.automation/test/states/states_good_1.json b/.automation/test/states/states_good_1.json new file mode 100644 index 00000000..0c1be861 --- /dev/null +++ b/.automation/test/states/states_good_1.json @@ -0,0 +1,11 @@ +{ + "Comment": "A simple minimal example of the States language", + "StartAt": "Hello World", + "States": { + "Hello World": { + "Type": "Task", + "Resource": "arn:aws:lambda:us-east-1:123456789012:function:HelloWorld", + "End": true + } + } +} diff --git a/.automation/test/terraform/README.md b/.automation/test/terraform/README.md index e69de29b..6cb4f692 100644 --- a/.automation/test/terraform/README.md +++ b/.automation/test/terraform/README.md @@ -0,0 +1,19 @@ +# AWS States language Test Cases + +This folder holds the test cases for **Terraform**. + +## Additional Docs + +No Additional information is needed for this test case. + +## Good Test Cases + +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. + +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases + +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. + +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/terraform_terrascan/README.md b/.automation/test/terraform_terrascan/README.md new file mode 100644 index 00000000..036699d9 --- /dev/null +++ b/.automation/test/terraform_terrascan/README.md @@ -0,0 +1,19 @@ +# AWS States language Test Cases + +This folder holds the test cases for **Terraform terrascan**. + +## Additional Docs + +No Additional information is needed for this test case. + +## Good Test Cases + +The test cases denoted: `LANGUAGE_good_FILE.EXTENSION` are all valid, and should pass successfully when linted. + +- **Note:** They are linted utilizing the default linter rules. + +## Bad Test Cases + +The test cases denoted: `LANGUAGE_bad_FILE.EXTENSION` are **NOT** valid, and should trigger errors when linted. + +- **Note:** They are linted utilizing the default linter rules. diff --git a/.automation/test/terraform_terrascan/bad/terraform_bad_1.tf b/.automation/test/terraform_terrascan/bad/terraform_bad_1.tf new file mode 100644 index 00000000..57b891dc --- /dev/null +++ b/.automation/test/terraform_terrascan/bad/terraform_bad_1.tf @@ -0,0 +1,9 @@ +resource "aws_instance" "bad" { + ami = "ami-0ff8a91507f77f867" + instance_type = "t2.small" + associate_public_ip_address = true + + ebs_block_device { + encrypted = true + } +} diff --git a/.automation/test/terraform_terrascan/good/terraform_good_1.tf b/.automation/test/terraform_terrascan/good/terraform_good_1.tf new file mode 100644 index 00000000..59d24f7e --- /dev/null +++ b/.automation/test/terraform_terrascan/good/terraform_good_1.tf @@ -0,0 +1,9 @@ +resource "aws_instance" "good" { + ami = "ami-0ff8a91507f77f867" + instance_type = "t2.small" + associate_public_ip_address = false + + ebs_block_device { + encrypted = true + } +} diff --git a/.automation/test/terraform_terrascan/reports/expected-TERRAFORM.tap b/.automation/test/terraform_terrascan/reports/expected-TERRAFORM.tap new file mode 100644 index 00000000..6fcc7cb9 --- /dev/null +++ b/.automation/test/terraform_terrascan/reports/expected-TERRAFORM.tap @@ -0,0 +1,22 @@ +TAP version 13 +1..2 +not ok 1 - terraform_bad_1.tf + terrascan version 0.2.3 + Logging level set to error. + ........................................................................ + ---------------------------------------------------------------------- + Ran 72 tests in 0.008s + + OK + + Processed 1 files in /tmp/lint/.terrascan + + + Processed on 07/24/2020 at 03:22 + Results (took 0.42 seconds): + + Failures: (1) + [high] [aws_instance.bad.associate_public_ip_address] should not be 'True'. Is: 'True' in module .terrascan, file /tmp/lint/.terrascan/terraform_bad_1.tf + + Errors: (0) +ok 2 - terraform_good_1.tf diff --git a/.automation/test/yml/README.md b/.automation/test/yaml/README.md similarity index 87% rename from .automation/test/yml/README.md rename to .automation/test/yaml/README.md index 8016e848..3f42a5fa 100644 --- a/.automation/test/yml/README.md +++ b/.automation/test/yaml/README.md @@ -1,6 +1,6 @@ -# Yml Test Cases +# Yaml Test Cases -This folder holds the test cases for **Yml**. +This folder holds the test cases for **Yaml**. ## Additional Docs diff --git a/.automation/test/yml/reports/expected-YML.tap b/.automation/test/yaml/reports/expected-YML.tap similarity index 100% rename from .automation/test/yml/reports/expected-YML.tap rename to .automation/test/yaml/reports/expected-YML.tap diff --git a/.automation/test/yml/yml_bad_1.yml b/.automation/test/yaml/yml_bad_1.yml similarity index 100% rename from .automation/test/yml/yml_bad_1.yml rename to .automation/test/yaml/yml_bad_1.yml diff --git a/.automation/test/yml/yml_good_1.yml b/.automation/test/yaml/yml_good_1.yml similarity index 100% rename from .automation/test/yml/yml_good_1.yml rename to .automation/test/yaml/yml_good_1.yml diff --git a/.automation/upload-docker.sh b/.automation/upload-docker.sh index 42ea1c65..c31ffbde 100755 --- a/.automation/upload-docker.sh +++ b/.automation/upload-docker.sh @@ -14,6 +14,12 @@ # - System with Docker installed # - Global variables met +######################### +# Source Function Files # +######################### +# shellcheck source=/dev/null +source ../lib/log.sh # Source the function script(s) + ########### # Globals # ########### @@ -35,11 +41,9 @@ UPDATE_MAJOR_TAG=0 # Flag to deploy the major tag version as ################################################################################ #### Function Header ########################################################### Header() { - echo "" - echo "-------------------------------------------------------" - echo "---- GitHub Actions Upload image to [${REGISTRY}] ----" - echo "-------------------------------------------------------" - echo "" + info "-------------------------------------------------------" + info "---- GitHub Actions Upload image to [${REGISTRY}] ----" + info "-------------------------------------------------------" } ################################################################################ #### Function ValidateInput #################################################### @@ -48,32 +52,28 @@ ValidateInput() { ################ # Print header # ################ - echo "" - echo "----------------------------------------------" - echo "Gathering variables..." - echo "----------------------------------------------" - echo "" + info "----------------------------------------------" + info "Gathering variables..." + info "----------------------------------------------" ############################# # Validate GITHUB_WORKSPACE # ############################# if [ -z "${GITHUB_WORKSPACE}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GITHUB_WORKSPACE]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GITHUB_WORKSPACE}]${NC}" - exit 1 + error "Failed to get [GITHUB_WORKSPACE]!" + fatal "[${GITHUB_WORKSPACE}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_WORKSPACE]${F[B]}, value:${F[W]}[${GITHUB_WORKSPACE}]${NC}" + info "Successfully found:${F[W]}[GITHUB_WORKSPACE]${F[B]}, value:${F[W]}[${GITHUB_WORKSPACE}]" fi ##################### # Validate REGISTRY # ##################### if [ -z "${REGISTRY}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [REGISTRY]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${REGISTRY}]${NC}" - exit 1 + error "Failed to get [REGISTRY]!" + fatal "[${REGISTRY}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[REGISTRY]${F[B]}, value:${F[W]}[${REGISTRY}]${NC}" + info "Successfully found:${F[W]}[REGISTRY]${F[B]}, value:${F[W]}[${REGISTRY}]" fi ##################################################### @@ -84,22 +84,20 @@ ValidateInput() { # Validate GPR_USERNAME # ######################### if [ -z "${GPR_USERNAME}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GPR_USERNAME]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GPR_USERNAME}]${NC}" - exit 1 + error "Failed to get [GPR_USERNAME]!" + fatal "[${GPR_USERNAME}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GPR_USERNAME]${F[B]}, value:${F[W]}[${GPR_USERNAME}]${NC}" + info "Successfully found:${F[W]}[GPR_USERNAME]${F[B]}, value:${F[W]}[${GPR_USERNAME}]" fi ###################### # Validate GPR_TOKEN # ###################### if [ -z "${GPR_TOKEN}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GPR_TOKEN]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GPR_TOKEN}]${NC}" - exit 1 + error "Failed to get [GPR_TOKEN]!" + fatal "[${GPR_TOKEN}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GPR_TOKEN]${F[B]}, value:${F[W]}[********]${NC}" + info "Successfully found:${F[W]}[GPR_TOKEN]${F[B]}, value:${F[W]}[********]" fi ######################################## # See if we need values for Ducker hub # @@ -109,48 +107,44 @@ ValidateInput() { # Validate DOCKER_USERNAME # ############################ if [ -z "${DOCKER_USERNAME}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [DOCKER_USERNAME]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${DOCKER_USERNAME}]${NC}" - exit 1 + error "Failed to get [DOCKER_USERNAME]!" + fatal "[${DOCKER_USERNAME}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[DOCKER_USERNAME]${F[B]}, value:${F[W]}[${DOCKER_USERNAME}]${NC}" + info "Successfully found:${F[W]}[DOCKER_USERNAME]${F[B]}, value:${F[W]}[${DOCKER_USERNAME}]" fi ############################ # Validate DOCKER_PASSWORD # ############################ if [ -z "${DOCKER_PASSWORD}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [DOCKER_PASSWORD]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${DOCKER_PASSWORD}]${NC}" - exit 1 + error "Failed to get [DOCKER_PASSWORD]!" + fatal "[${DOCKER_PASSWORD}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[DOCKER_PASSWORD]${F[B]}, value:${F[B]}[********]${NC}" + info "Successfully found:${F[W]}[DOCKER_PASSWORD]${F[B]}, value:${F[B]}[********]" fi ########################################### # We were not passed a registry to update # ########################################### else - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to find a valid registry!${NC}" - echo "Registry:[${REGISTRY}]" - exit 1 + error "Failed to find a valid registry!" + fatal "Registry:[${REGISTRY}]" fi ####################### # Validate IMAGE_REPO # ####################### if [ -z "${IMAGE_REPO}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [IMAGE_REPO]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${IMAGE_REPO}]${NC}" - exit 1 + error "Failed to get [IMAGE_REPO]!" + fatal "[${IMAGE_REPO}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[IMAGE_REPO]${F[B]}, value:${F[W]}[${IMAGE_REPO}]${NC}" + info "Successfully found:${F[W]}[IMAGE_REPO]${F[B]}, value:${F[W]}[${IMAGE_REPO}]" ############################################### # Need to see if GPR registry and update name # ############################################### if [[ ${REGISTRY} == "GPR" ]]; then NAME="docker.pkg.github.com/${IMAGE_REPO}/super-linter" IMAGE_REPO="${NAME}" - echo "Updated [IMAGE_REPO] to:[${IMAGE_REPO}] for GPR" + info "Updated [IMAGE_REPO] to:[${IMAGE_REPO}] for GPR" fi fi @@ -158,8 +152,8 @@ ValidateInput() { # Validate IMAGE_VERSION # ########################## if [ -z "${IMAGE_VERSION}" ]; then - echo -e "${NC}${F[Y]}WARN!${NC} Failed to get [IMAGE_VERSION]!${NC}" - echo "Pulling from Branch Name..." + warn "Failed to get [IMAGE_VERSION]!" + info "Pulling from Branch Name..." ############################## # Get the name of the branch # ############################## @@ -174,9 +168,8 @@ ValidateInput() { # Check the shell for errors # ############################## if [ ${ERROR_CODE} -ne 0 ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get branch name!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${BRANCH_NAME}]${NC}" - exit 1 + error "Failed to get branch name!" + fatal "[${BRANCH_NAME}]" fi ################################## @@ -188,9 +181,9 @@ ValidateInput() { # Set the IMAGE_VERSION to the BRANCH_NAME # ############################################ IMAGE_VERSION="${BRANCH_NAME}" - echo "Tag:[${IMAGE_VERSION}]" + info "Tag:[${IMAGE_VERSION}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[IMAGE_VERSION]${F[B]}, value:${F[W]}[${IMAGE_VERSION}]${NC}" + info "Successfully found:${F[W]}[IMAGE_VERSION]${F[B]}, value:${F[W]}[${IMAGE_VERSION}]" fi ################################## @@ -214,18 +207,17 @@ ValidateInput() { ################################### UPDATE_MAJOR_TAG=1 - echo "- Also deploying a major tag of:[${MAJOR_TAG}]" + info "- Also deploying a major tag of:[${MAJOR_TAG}]" fi ############################ # Validate DOCKERFILE_PATH # ############################ if [ -z "${DOCKERFILE_PATH}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [DOCKERFILE_PATH]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${DOCKERFILE_PATH}]${NC}" - exit 1 + error "Failed to get [DOCKERFILE_PATH]!" + fatal "[${DOCKERFILE_PATH}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[DOCKERFILE_PATH]${F[B]}, value:${F[W]}[${DOCKERFILE_PATH}]${NC}" + info "Successfully found:${F[W]}[DOCKERFILE_PATH]${F[B]}, value:${F[W]}[${DOCKERFILE_PATH}]" fi } ################################################################################ @@ -242,11 +234,9 @@ Authenticate() { ################ # Print header # ################ - echo "" - echo "----------------------------------------------" - echo "Login to ${NAME}..." - echo "----------------------------------------------" - echo "" + info "----------------------------------------------" + info "Login to ${NAME}..." + info "----------------------------------------------" ################### # Auth to service # @@ -263,12 +253,11 @@ Authenticate() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # ERROR - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to authenticate to ${NAME}!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${LOGIN_CMD}]${NC}" - exit 1 + error "Failed to authenticate to ${NAME}!" + fatal "[${LOGIN_CMD}]" else # SUCCESS - echo -e "${NC}${F[B]}Successfully authenticated to ${F[C]}${NAME}${F[B]}!${NC}" + info "Successfully authenticated to ${F[C]}${NAME}${F[B]}!" fi } ################################################################################ @@ -277,21 +266,18 @@ BuildImage() { ################ # Print header # ################ - echo "" - echo "----------------------------------------------" - echo "Building the DockerFile image..." - echo "----------------------------------------------" - echo "" + info "----------------------------------------------" + info "Building the DockerFile image..." + info "----------------------------------------------" ################################ # Validate the DOCKERFILE_PATH # ################################ if [ ! -f "${DOCKERFILE_PATH}" ]; then # No file found - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} failed to find Dockerfile at:[${DOCKERFILE_PATH}]${NC}" - echo "Please make sure you give full path!" - echo "Example:[/configs/Dockerfile] or [Dockerfile] if at root directory" - exit 1 + error "failed to find Dockerfile at:[${DOCKERFILE_PATH}]" + error "Please make sure you give full path!" + fatal "Example:[/configs/Dockerfile] or [Dockerfile] if at root directory" fi ################### @@ -309,11 +295,10 @@ BuildImage() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # ERROR - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} failed to [build] Dockerfile!${NC}" - exit 1 + fatal "failed to [build] Dockerfile!" else # SUCCESS - echo -e "${NC}${F[B]}Successfully Built image!${NC}" + info "Successfully Built image!" fi ######################################################## @@ -333,11 +318,10 @@ BuildImage() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # ERROR - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} failed to [tag] Dockerfile!${NC}" - exit 1 + fatal "failed to [tag] Dockerfile!" else # SUCCESS - echo -e "${NC}${F[B]}Successfully tagged image!${NC}" + info "Successfully tagged image!" fi fi } @@ -347,11 +331,9 @@ UploadImage() { ################ # Print header # ################ - echo "" - echo "----------------------------------------------" - echo "Uploading the DockerFile image to ${REGISTRY}..." - echo "----------------------------------------------" - echo "" + info "----------------------------------------------" + info "Uploading the DockerFile image to ${REGISTRY}..." + info "----------------------------------------------" ############################################ # Upload the docker image that was created # @@ -368,11 +350,10 @@ UploadImage() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # ERROR - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} failed to [upload] Dockerfile!${NC}" - exit 1 + fatal "failed to [upload] Dockerfile!" else # SUCCESS - echo -e "${NC}${F[B]}Successfully Uploaded Docker image:${F[W]}[${IMAGE_VERSION}]${F[B]} to ${F[C]}${REGISTRY}${F[B]}!${NC}" + info "Successfully Uploaded Docker image:${F[W]}[${IMAGE_VERSION}]${F[B]} to ${F[C]}${REGISTRY}${F[B]}!" fi ######################### @@ -391,9 +372,8 @@ UploadImage() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # ERROR - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get information about built Image!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GET_INFO_CMD}]${NC}" - exit 1 + error "Failed to get information about built Image!" + fatal "[${GET_INFO_CMD}]" else ################ # Get the data # @@ -406,13 +386,13 @@ UploadImage() { ################### # Print the goods # ################### - echo "----------------------------------------------" - echo "Docker Image Details:" - echo "Repository:[${REPO}]" - echo "Tag:[${TAG}]" - echo "Image_ID:[${IMAGE_ID}]" - echo "Size:[${SIZE}]" - echo "----------------------------------------------" + info "----------------------------------------------" + info "Docker Image Details:" + info "Repository:[${REPO}]" + info "Tag:[${TAG}]" + info "Image_ID:[${IMAGE_ID}]" + info "Size:[${SIZE}]" + info "----------------------------------------------" fi ############################################################### @@ -434,22 +414,19 @@ UploadImage() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # ERROR - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} failed to [upload] MAJOR_TAG:[${MAJOR_TAG}] Dockerfile!${NC}" - exit 1 + fatal "failed to [upload] MAJOR_TAG:[${MAJOR_TAG}] Dockerfile!" else # SUCCESS - echo -e "${NC}${F[B]}Successfully Uploaded TAG:${F[W]}[${MAJOR_TAG}]${F[B]} of Docker image to ${F[C]}${REGISTRY}${F[B]}!${NC}" + info "Successfully Uploaded TAG:${F[W]}[${MAJOR_TAG}]${F[B]} of Docker image to ${F[C]}${REGISTRY}${F[B]}!" fi fi } ################################################################################ #### Function Footer ########################################################### Footer() { - echo "" - echo "-------------------------------------------------------" - echo "The step has completed" - echo "-------------------------------------------------------" - echo "" + info "-------------------------------------------------------" + info "The step has completed" + info "-------------------------------------------------------" } ################################################################################ ################################## MAIN ######################################## @@ -488,9 +465,8 @@ else ######### # ERROR # ######### - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Registry not set correctly!${NC}" - echo "Registry:[${REGISTRY}]" - exit 1 + error "Registry not set correctly!" + fatal "Registry:[${REGISTRY}]" fi #################### diff --git a/.github/linters/.flake8 b/.github/linters/.flake8 new file mode 100644 index 00000000..6deafc26 --- /dev/null +++ b/.github/linters/.flake8 @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 120 diff --git a/.github/linters/.groovylintrc.json b/.github/linters/.groovylintrc.json new file mode 100644 index 00000000..474f8151 --- /dev/null +++ b/.github/linters/.groovylintrc.json @@ -0,0 +1,65 @@ +{ + "extends": "recommended", + "rules": { + "CatchException": { + "enabled": false + }, + "CatchThrowable": { + "enabled": false + }, + "ClassJavadoc": { + "enabled": false + }, + "ClosureAsLastMethodParameter": { + "enabled": false + }, + "DuplicateNumberLiteral": { + "enabled": false + }, + "DuplicateStringLiteral": { + "enabled": false + }, + "FieldTypeRequired": { + "enabled": false + }, + "JavaIoPackageAccess": { + "enabled": false + }, + "MethodParameterTypeRequired": { + "enabled": false + }, + "MethodSize": { + "enabled": false + }, + "NoDef": { + "enabled": false + }, + "PrintStackTrace": { + "enabled": false + }, + "PropertyName": { + "enabled": false + }, + "SpaceAroundMapEntryColon": { + "enabled": false + }, + "SystemExit": { + "enabled": false + }, + "UnnecessaryGetter": { + "enabled": false + }, + "UnnecessaryObjectReferences": { + "enabled": false + }, + "UnnecessarySetter": { + "enabled": false + }, + "VariableName": { + "enabled": false + }, + "VariableTypeRequired": { + "enabled": false + } + } +} diff --git a/.github/linters/.luacheckrc b/.github/linters/.luacheckrc new file mode 100644 index 00000000..00aa308f --- /dev/null +++ b/.github/linters/.luacheckrc @@ -0,0 +1 @@ +--std max diff --git a/.github/workflows/automerge-dependabot.yml b/.github/workflows/automerge-dependabot.yml index 1e212ebf..5caaa35e 100644 --- a/.github/workflows/automerge-dependabot.yml +++ b/.github/workflows/automerge-dependabot.yml @@ -30,18 +30,17 @@ jobs: if: github.actor == 'dependabot[bot]' steps: - name: merge - uses: actions/github-script@0.2.0 + uses: actions/github-script@v2 with: script: | - github.pullRequests.createReview({ + github.pulls.createReview({ owner: context.payload.repository.owner.login, repo: context.payload.repository.name, pull_number: context.payload.pull_request.number, event: 'APPROVE' }) - github.pullRequests.merge({ + github.pulls.merge({ owner: context.payload.repository.owner.login, repo: context.payload.repository.name, pull_number: context.payload.pull_request.number }) - github-token: ${{github.token}} diff --git a/.github/workflows/stack-linter.yml b/.github/workflows/stack-linter.yml index 8337c088..05734646 100644 --- a/.github/workflows/stack-linter.yml +++ b/.github/workflows/stack-linter.yml @@ -45,3 +45,4 @@ jobs: uses: docker://github/super-linter:latest env: VALIDATE_ALL_CODEBASE: false + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 4aecddcb..aac6767a 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -29,7 +29,7 @@ jobs: if: "github.event_name == 'schedule'" steps: - name: Mark issue stale - uses: actions/stale@v3.0.8 + uses: actions/stale@v3.0.9 with: repo-token: ${{ secrets.GITHUB_TOKEN }} stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity.\nIt will be closed in 14 days if no further activity occurs.\nThank you for your contributions.\n\nIf you think this issue should stay open, please remove the `O: stale 🤖` label or comment on the issue." diff --git a/.gitignore b/.gitignore index df2846f3..5ab6c13d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ logs npm-debug.log* yarn-debug.log* yarn-error.log* +/package-lock.json # Runtime data pids diff --git a/Dockerfile b/Dockerfile index 08d12dcc..08e9688e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,11 +7,11 @@ ######################################### # Get dependency images as build stages # ######################################### -FROM borkdude/clj-kondo:2020.06.21 as clj-kondo +FROM borkdude/clj-kondo:2020.07.29 as clj-kondo FROM dotenvlinter/dotenv-linter:2.1.0 as dotenv-linter FROM mstruebing/editorconfig-checker:2.1.0 as editorconfig-checker -FROM golangci/golangci-lint:v1.29.0 as golangci-lint -FROM yoheimuta/protolint:v0.25.1 as protolint +FROM golangci/golangci-lint:v1.30.0 as golangci-lint +FROM yoheimuta/protolint:v0.26.0 as protolint FROM koalaman/shellcheck:v0.7.1 as shellcheck FROM wata727/tflint:0.18.0 as tflint @@ -52,25 +52,25 @@ ARG GLIBC_VERSION='2.31-r0' RUN apk add --update --no-cache \ ansible-lint \ bash \ + coreutils \ curl \ gcc \ - git \ + git git-lfs\ go \ icu-libs \ jq \ - libxml2-utils \ + libc-dev libxml2-utils \ make \ musl-dev \ - npm \ - nodejs \ + npm nodejs-current \ openjdk8-jre \ perl \ - php7 \ + php7 php7-phar php7-json php7-mbstring php-xmlwriter \ + php7-tokenizer php7-ctype php7-curl php7-dom php7-simplexml \ py3-setuptools \ - ruby \ - ruby-dev \ - ruby-bundler \ - ruby-rdoc + readline-dev \ + ruby ruby-dev ruby-bundler ruby-rdoc \ + gnupg ######################################## # Copy dependencies files to container # @@ -100,6 +100,19 @@ ENV PATH="/node_modules/.bin:${PATH}" ############################## RUN bundle install +############################## +# Install Phive dependencies # +############################## +RUN wget -O phive.phar https://phar.io/releases/phive.phar \ + && wget -O phive.phar.asc https://phar.io/releases/phive.phar.asc \ + && gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79 \ + && gpg --verify phive.phar.asc phive.phar \ + && chmod +x phive.phar \ + && mv phive.phar /usr/local/bin/phive \ + && rm phive.phar.asc \ + && phive install --trust-gpg-keys 31C7E470E2138192,CF1A108D0E7AE720,8A03EA3B385DBAA1 +# Trusted GPG keys for PHP linters: phpcs, phpstan, psalm + ######################################### # Install Powershell + PSScriptAnalyzer # ######################################### @@ -174,7 +187,7 @@ RUN curl -sSLO https://github.com/pinterest/ktlint/releases/latest/download/ktli #################### RUN wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub RUN wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/${GLIBC_VERSION}/glibc-${GLIBC_VERSION}.apk -RUN apk add --no-cache glibc-${GLIBC_VERSION}.apk +RUN apk add --no-cache glibc-${GLIBC_VERSION}.apk && rm glibc-${GLIBC_VERSION}.apk RUN wget https://storage.googleapis.com/dart-archive/channels/stable/release/${DART_VERSION}/sdk/dartsdk-linux-x64-release.zip -O - -q | unzip -q - \ && chmod +x dart-sdk/bin/dart* \ && mv dart-sdk/bin/* /usr/bin/ && mv dart-sdk/lib/* /usr/lib/ && mv dart-sdk/include/* /usr/include/ \ @@ -198,54 +211,82 @@ RUN CHECKSTYLE_LATEST=$(curl -s https://api.github.com/repos/checkstyle/checksty && curl -sSL $CHECKSTYLE_LATEST \ --output /usr/bin/checkstyle.jar +#################### +# Install luacheck # +#################### +RUN wget https://www.lua.org/ftp/lua-5.3.5.tar.gz -O - -q | tar -xzf - \ + && cd lua-5.3.5 \ + && make linux \ + && make install \ + && cd .. && rm -r lua-5.3.5/ + +RUN wget https://github.com/cvega/luarocks/archive/v3.3.1-super-linter.tar.gz -O - -q | tar -xzf - \ + && cd luarocks-3.3.1-super-linter \ + && ./configure --with-lua-include=/usr/local/include \ + && make \ + && make -b install \ + && cd .. && rm -r luarocks-3.3.1-super-linter/ + +RUN luarocks install luacheck + ########################################### # Load GitHub Env Vars for GitHub Actions # ########################################### -ENV GITHUB_SHA=${GITHUB_SHA} \ - GITHUB_EVENT_PATH=${GITHUB_EVENT_PATH} \ - GITHUB_WORKSPACE=${GITHUB_WORKSPACE} \ - DEFAULT_BRANCH=${DEFAULT_BRANCH} \ - VALIDATE_ALL_CODEBASE=${VALIDATE_ALL_CODEBASE} \ - LINTER_RULES_PATH=${LINTER_RULES_PATH} \ - VALIDATE_YAML=${VALIDATE_YAML} \ - VALIDATE_JSON=${VALIDATE_JSON} \ - VALIDATE_XML=${VALIDATE_XML} \ - VALIDATE_MD=${VALIDATE_MD} \ - VALIDATE_BASH=${VALIDATE_BASH} \ - VALIDATE_PERL=${VALIDATE_PERL} \ - VALIDATE_RAKU=${VALIDATE_RAKU} \ - VALIDATE_PHP=${VALIDATE_PHP} \ - VALIDATE_PYTHON=${VALIDATE_PYTHON} \ - VALIDATE_RUBY=${VALIDATE_RUBY} \ - VALIDATE_COFFEE=${VALIDATE_COFFEE} \ - VALIDATE_ANSIBLE=${VALIDATE_ANSIBLE} \ - VALIDATE_DOCKER=${VALIDATE_DOCKER} \ - VALIDATE_JAVASCRIPT_ES=${VALIDATE_JAVASCRIPT_ES} \ - VALIDATE_JAVASCRIPT_STANDARD=${VALIDATE_JAVASCRIPT_STANDARD} \ - VALIDATE_TYPESCRIPT_ES=${VALIDATE_TYPESCRIPT_ES} \ - VALIDATE_TYPESCRIPT_STANDARD=${VALIDATE_TYPESCRIPT_STANDARD} \ - VALIDATE_GO=${VALIDATE_GO} \ - VALIDATE_TERRAFORM=${VALIDATE_TERRAFORM} \ - VALIDATE_CSS=${VALIDATE_CSS} \ - VALIDATE_ENV=${VALIDATE_ENV} \ - VALIDATE_HTML=${VALIDATE_HTML} \ - VALIDATE_CLOJURE=${VALIDATE_CLOJURE} \ - VALIDATE_KOTLIN=${VALIDATE_KOTLIN} \ - VALIDATE_DART=${VALIDATE_DART} \ - VALIDATE_POWERSHELL=${VALIDATE_POWERSHELL} \ - VALIDATE_JAVA=${VALIDATE_JAVA} \ - VALIDATE_ARM=${VALIDATE_ARM} \ - VALIDATE_OPENAPI=${VALIDATE_OPENAPI} \ - VALIDATE_PROTOBUF=${VALIDATE_PROTOBUF} \ - VALIDATE_EDITORCONFIG=${VALIDATE_EDITORCONFIG} \ +ENV ACTIONS_RUNNER_DEBUG=${ACTIONS_RUNNER_DEBUG} \ ANSIBLE_DIRECTORY=${ANSIBLE_DIRECTORY} \ + DEFAULT_BRANCH=${DEFAULT_BRANCH} \ + DISABLE_ERRORS=${DISABLE_ERRORS} \ + GITHUB_EVENT_PATH=${GITHUB_EVENT_PATH} \ + GITHUB_SHA=${GITHUB_SHA} \ + GITHUB_TOKEN=${GITHUB_TOKEN} \ + GITHUB_WORKSPACE=${GITHUB_WORKSPACE} \ + LINTER_RULES_PATH=${LINTER_RULES_PATH} \ + LOG_FILE=${LOG_FILE} \ + LOG_LEVEL=${LOG_LEVEL} \ + OUTPUT_DETAILS=${OUTPUT_DETAILS} \ + OUTPUT_FOLDER=${OUTPUT_FOLDER} \ + OUTPUT_FORMAT=${OUTPUT_FORMAT} \ RUN_LOCAL=${RUN_LOCAL} \ TEST_CASE_RUN=${TEST_CASE_RUN} \ - ACTIONS_RUNNER_DEBUG=${ACTIONS_RUNNER_DEBUG} \ - DISABLE_ERRORS=${DISABLE_ERRORS} \ - OUTPUT_FORMAT=${OUTPUT_FORMAT} \ - OUTPUT_FOLDER=${OUTPUT_FOLDER} \ - OUTPUT_DETAILS=${OUTPUT_DETAILS} + VALIDATE_ALL_CODEBASE=${VALIDATE_ALL_CODEBASE} \ + VALIDATE_ANSIBLE=${VALIDATE_ANSIBLE} \ + VALIDATE_ARM=${VALIDATE_ARM} \ + VALIDATE_BASH=${VALIDATE_BASH} \ + VALIDATE_CLOJURE=${VALIDATE_CLOJURE} \ + VALIDATE_CLOUDFORMATION=${VALIDATE_CLOUDFORMATION} \ + VALIDATE_COFFEE=${VALIDATE_COFFEE} \ + VALIDATE_CSS=${VALIDATE_CSS} \ + VALIDATE_DART=${VALIDATE_DART} \ + VALIDATE_DOCKER=${VALIDATE_DOCKER} \ + VALIDATE_EDITORCONFIG=${VALIDATE_EDITORCONFIG} \ + VALIDATE_ENV=${VALIDATE_ENV} \ + VALIDATE_GO=${VALIDATE_GO} \ + VALIDATE_HTML=${VALIDATE_HTML} \ + VALIDATE_JAVA=${VALIDATE_JAVA} \ + VALIDATE_JAVASCRIPT_ES=${VALIDATE_JAVASCRIPT_ES} \ + VALIDATE_JAVASCRIPT_STANDARD=${VALIDATE_JAVASCRIPT_STANDARD} \ + VALIDATE_JSON=${VALIDATE_JSON} \ + VALIDATE_KOTLIN=${VALIDATE_KOTLIN} \ + VALIDATE_LUA=${VALIDATE_LUA} \ + VALIDATE_MD=${VALIDATE_MD} \ + VALIDATE_OPENAPI=${VALIDATE_OPENAPI} \ + VALIDATE_PERL=${VALIDATE_PERL} \ + VALIDATE_PHP=${VALIDATE_PHP} \ + VALIDATE_PHP_PHPSTAN=${VALIDATE_PHP_PHPSTAN} \ + VALIDATE_POWERSHELL=${VALIDATE_POWERSHELL} \ + VALIDATE_PROTOBUF=${VALIDATE_PROTOBUF} \ + VALIDATE_PYTHON=${VALIDATE_PYTHON} \ + VALIDATE_PYTHON_PYLINT=${VALIDATE_PYTHON_PYLINT} \ + VALIDATE_PYTHON_FLAKE8=${VALIDATE_PYTHON_FLAKE8} \ + VALIDATE_RAKU=${VALIDATE_RAKU} \ + VALIDATE_RUBY=${VALIDATE_RUBY} \ + VALIDATE_STATES=${VALIDATE_STATES} \ + VALIDATE_TERRAFORM=${VALIDATE_TERRAFORM} \ + VALIDATE_TERRAFORM_TERRASCAN=${VALIDATE_TERRAFORM_TERRASCAN} \ + VALIDATE_TYPESCRIPT_ES=${VALIDATE_TYPESCRIPT_ES} \ + VALIDATE_TYPESCRIPT_STANDARD=${VALIDATE_TYPESCRIPT_STANDARD} \ + VALIDATE_XML=${VALIDATE_XML} \ + VALIDATE_YAML=${VALIDATE_YAML} ############################# # Copy scripts to container # diff --git a/README.md b/README.md index b817f997..4acb5164 100644 --- a/README.md +++ b/README.md @@ -41,39 +41,40 @@ The design of the **Super-Linter** is currently to allow linting to occur in **G Developers on **GitHub** can call the **GitHub Action** to lint their code base with the following list of linters: -| *Language* | *Linter* | -| --- | --- | -| **Ansible** | [ansible-lint](https://github.com/ansible/ansible-lint) | -| **Azure Resource Manager (ARM)** | [arm-ttk](https://github.com/azure/arm-ttk) | -| **AWS CloudFormation templates** | [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint/) | -| **CSS** | [stylelint](https://stylelint.io/) | -| **Clojure** | [clj-kondo](https://github.com/borkdude/clj-kondo) | -| **CoffeeScript** | [coffeelint](https://coffeelint.github.io/) | -| **Dart** | [dartanalyzer](https://dart.dev/guides/language/analysis-options) | -| **Dockerfile** | [dockerfilelint](https://github.com/replicatedhq/dockerfilelint.git) | -| **EDITORCONFIG** | [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) | -| **ENV** | [dotenv-linter](https://github.com/dotenv-linter/dotenv-linter) | -| **Golang** | [golangci-lint](https://github.com/golangci/golangci-lint) | -| **HTMLHint** | [HTMLHint](https://github.com/htmlhint/HTMLHint) | -| **JavaScript** | [eslint](https://eslint.org/) [standard js](https://standardjs.com/) | -| **JSON** | [jsonlint](https://github.com/zaach/jsonlint) | -| **CSS** | [stylelint](https://stylelint.io/) | -| **Java** | [checkstyle](https://checkstyle.org) | -| **Kotlin** | [ktlint](https://github.com/pinterest/ktlint) | -| **Markdown** | [markdownlint](https://github.com/igorshubovych/markdownlint-cli#readme) | -| **OpenAPI** | [spectral](https://github.com/stoplightio/spectral) | -| **Perl** | [perl](https://pkgs.alpinelinux.org/package/edge/main/x86/perl) | -| **PHP** | [PHP](https://www.php.net/) | -| **PowerShell** | [PSScriptAnalyzer](https://github.com/PowerShell/Psscriptanalyzer) | -| **Protocol Buffers** | [protolint](https://github.com/yoheimuta/protolint) | -| **Python3** | [pylint](https://www.pylint.org/) | -| **Raku** | [raku](https://raku.org) | -| **Ruby** | [RuboCop](https://github.com/rubocop-hq/rubocop) | -| **Shell** | [Shellcheck](https://github.com/koalaman/shellcheck) | -| **Terraform** | [tflint](https://github.com/terraform-linters/tflint) | -| **TypeScript** | [eslint](https://eslint.org/) [standard js](https://standardjs.com/) | -| **XML** | [LibXML](http://xmlsoft.org/) | -| **YAML** | [YamlLint](https://github.com/adrienverge/yamllint) | +| _Language_ | _Linter_ | +| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| **Ansible** | [ansible-lint](https://github.com/ansible/ansible-lint) | +| **Azure Resource Manager (ARM)** | [arm-ttk](https://github.com/azure/arm-ttk) | +| **AWS CloudFormation templates** | [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint/) | +| **CSS** | [stylelint](https://stylelint.io/) | +| **Clojure** | [clj-kondo](https://github.com/borkdude/clj-kondo) | +| **CoffeeScript** | [coffeelint](https://coffeelint.github.io/) | +| **Dart** | [dartanalyzer](https://dart.dev/guides/language/analysis-options) | +| **Dockerfile** | [dockerfilelint](https://github.com/replicatedhq/dockerfilelint.git) | +| **EDITORCONFIG** | [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) | +| **ENV** | [dotenv-linter](https://github.com/dotenv-linter/dotenv-linter) | +| **Golang** | [golangci-lint](https://github.com/golangci/golangci-lint) | +| **Groovy** | [npm-groovy-lint](https://github.com/nvuillam/npm-groovy-lint) | +| **HTMLHint** | [HTMLHint](https://github.com/htmlhint/HTMLHint) | +| **Java** | [checkstyle](https://checkstyle.org) | +| **JavaScript** | [eslint](https://eslint.org/) [standard js](https://standardjs.com/) | +| **JSON** | [jsonlint](https://github.com/zaach/jsonlint) | +| **Kotlin** | [ktlint](https://github.com/pinterest/ktlint) | +| **Lua** | [luacheck](https://github.com/luarocks/luacheck) | +| **Markdown** | [markdownlint](https://github.com/igorshubovych/markdownlint-cli#readme) | +| **OpenAPI** | [spectral](https://github.com/stoplightio/spectral) | +| **Perl** | [perl](https://pkgs.alpinelinux.org/package/edge/main/x86/perl) | +| **PHP** | [PHP built-in linter](https://www.php.net/) [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) [PHPStan](https://phpstan.org/n) [Psalm](https://psalm.dev/) | +| **PowerShell** | [PSScriptAnalyzer](https://github.com/PowerShell/Psscriptanalyzer) | +| **Protocol Buffers** | [protolint](https://github.com/yoheimuta/protolint) | +| **Python3** | [pylint](https://www.pylint.org/) [flake8](https://flake8.pycqa.org/en/latest/) | +| **Raku** | [raku](https://raku.org) | +| **Ruby** | [RuboCop](https://github.com/rubocop-hq/rubocop) | +| **Shell** | [Shellcheck](https://github.com/koalaman/shellcheck) | +| **Terraform** | [tflint](https://github.com/terraform-linters/tflint) [terrascan](https://github.com/accurics/terrascan) | +| **TypeScript** | [eslint](https://eslint.org/) [standard js](https://standardjs.com/) | +| **XML** | [LibXML](http://xmlsoft.org/) | +| **YAML** | [YamlLint](https://github.com/adrienverge/yamllint) | ## How to use @@ -169,54 +170,69 @@ and won't run anything unexpected. | **ENV VAR** | **Default Value** | **Notes** | | -------------------------------- | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| **VALIDATE_ALL_CODEBASE** | `true` | Will parse the entire repository and find all files to validate across all types. **NOTE:** When set to `false`, only **new** or **edited** files will be parsed for validation. | -| **DEFAULT_BRANCH** | `master` | The name of the repository default branch. | -| **LINTER_RULES_PATH** | `.github/linters` | Directory for all linter configuration rules. | -| **VALIDATE_YAML** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_JSON** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_XML** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_MD** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_BASH** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_PERL** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_RAKU** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_PHP** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_PYTHON** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_RUBY** | `true` | Flag to enable or disable the linting process of the language. | -| **RUBY_CONFIG_FILE** | `.ruby-lint.yml` | Filename for [rubocop configuration](https://docs.rubocop.org/rubocop/configuration.html) (ex: `.ruby-lint.yml`, `.rubocop.yml`) | -| **VALIDATE_COFFEE** | `true` | Flag to enable or disable the linting process of the language . | -| **VALIDATE_ANSIBLE** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_JAVASCRIPT_ES** | `true` | Flag to enable or disable the linting process of the language. (Utilizing: eslint) | -| **JAVASCRIPT_ES_CONFIG_FILE** | `.eslintrc.yml` | Filename for [eslint configuration](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) (ex: `.eslintrc.yml`, `.eslintrc.json`) | -| **VALIDATE_JAVASCRIPT_STANDARD** | `true` | Flag to enable or disable the linting process of the language. (Utilizing: standard) | -| **VALIDATE_JSX** | `true` | Flag to enable or disable the linting process for jsx files (Utilizing: eslint) | -| **VALIDATE_TSX** | `true` | Flag to enable or disable the linting process for tsx files (Utilizing: eslint) | -| **VALIDATE_TYPESCRIPT_ES** | `true` | Flag to enable or disable the linting process of the language. (Utilizing: eslint) | -| **TYPESCRIPT_ES_CONFIG_FILE** | `.eslintrc.yml` | Filename for [eslint configuration](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) (ex: `.eslintrc.yml`, `.eslintrc.json`) | -| **VALIDATE_TYPESCRIPT_STANDARD** | `true` | Flag to enable or disable the linting process of the language. (Utilizing: standard) | -| **VALIDATE_DOCKER** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_GO** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_POWERSHELL** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_ARM** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_TERRAFORM** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_CSS** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_ENV** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_CLOJURE** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_HTML** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_JAVA** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_KOTLIN** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_DART** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_OPENAPI** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_CLOUDFORMATION** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_PROTOBUF** | `true` | Flag to enable or disable the linting process of the language. | -| **VALIDATE_EDITORCONFIG** | `true` | Flag to enable or disable the linting process with the editorconfig. | -| **ANSIBLE_DIRECTORY** | `/ansible` | Flag to set the root directory for Ansible file location(s). | | **ACTIONS_RUNNER_DEBUG** | `false` | Flag to enable additional information about the linter, versions, and additional output. | -| **DISABLE_ERRORS** | `false` | Flag to have the linter complete with exit code 0 even if errors were detected. | +| **ANSIBLE_DIRECTORY** | `/ansible` | Flag to set the root directory for Ansible file location(s). | +| **DEFAULT_BRANCH** | `master` | The name of the repository default branch. | | **DEFAULT_WORKSPACE** | `/tmp/lint` | The location containing files to lint if you are running locally. | +| **DISABLE_ERRORS** | `false` | Flag to have the linter complete with exit code 0 even if errors were detected. | +| **JAVASCRIPT_ES_CONFIG_FILE** | `.eslintrc.yml` | Filename for [eslint configuration](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) (ex: `.eslintrc.yml`, `.eslintrc.json`) | +| **LINTER_RULES_PATH** | `.github/linters` | Directory for all linter configuration rules. | +| **LOG_FILE** | `super-linter.log` | The file name for outputting logs. All output is sent to the log file regardless of `LOG_LEVEL`. | +| **LOG_LEVEL** | `VERBOSE` | How much output the script will generate to the console. One of `VERBOSE`, `DEBUG` or `TRACE`. | +| **MULTI_STATUS** | `true` | A status API is made for each language that is linted to make visual parsing easier. | | **OUTPUT_FORMAT** | `none` | The report format to be generated, besides the stdout one. Output format of tap is currently using v13 of the specification. Supported formats: tap | | **OUTPUT_FOLDER** | `super-linter.report` | The location where the output reporting will be generated to. Output folder must not previously exist. | | **OUTPUT_DETAILS** | `simpler` | What level of details to be reported. Supported formats: simpler or detailed. | -| **MULTI_STATUS** | `true` | A status API is made for each language that is linted to make visual parsing easier. | +| **PYTHON_PYLINT_CONFIG_FILE** | `.python-lint` | Filename for [pylint configuration](http://pylint.pycqa.org/en/latest/user_guide/run.html?highlight=rcfile#command-line-options) (ex: `.python-lint`, `.pylintrc`) | +| **PYTHON_FLAKE8_CONFIG_FILE** | `.flake8` | Filename for [flake8 configuration](https://flake8.pycqa.org/en/latest/user/configuration.html) (ex: `.flake8`, `tox.ini`) | +| **RUBY_CONFIG_FILE** | `.ruby-lint.yml` | Filename for [rubocop configuration](https://docs.rubocop.org/rubocop/configuration.html) (ex: `.ruby-lint.yml`, `.rubocop.yml`) | +| **TYPESCRIPT_ES_CONFIG_FILE** | `.eslintrc.yml` | Filename for [eslint configuration](https://eslint.org/docs/user-guide/configuring#configuration-file-formats) (ex: `.eslintrc.yml`, `.eslintrc.json`) | +| **VALIDATE_ALL_CODEBASE** | `true` | Will parse the entire repository and find all files to validate across all types. **NOTE:** When set to `false`, only **new** or **edited** files will be parsed for validation. | +| **VALIDATE_ANSIBLE** | `true` | Flag to enable or disable the linting process of the Ansible language. | +| **VALIDATE_ARM** | `true` | Flag to enable or disable the linting process of the ARM language. | +| **VALIDATE_BASH** | `true` | Flag to enable or disable the linting process of the Bash language. | +| **VALIDATE_CLOJURE** | `true` | Flag to enable or disable the linting process of the Clojure language. | +| **VALIDATE_CLOUDFORMATION** | `true` | Flag to enable or disable the linting process of the AWS Cloud Formation language. | +| **VALIDATE_COFFEE** | `true` | Flag to enable or disable the linting process of the Coffeescript language . | +| **VALIDATE_CSS** | `true` | Flag to enable or disable the linting process of the CSS language. | +| **VALIDATE_DART** | `true` | Flag to enable or disable the linting process of the Dart language. | +| **VALIDATE_DOCKER** | `true` | Flag to enable or disable the linting process of the Docker language. | +| **VALIDATE_EDITORCONFIG** | `true` | Flag to enable or disable the linting process with the editorconfig. | +| **VALIDATE_ENV** | `true` | Flag to enable or disable the linting process of the ENV language. | +| **VALIDATE_GO** | `true` | Flag to enable or disable the linting process of the Golang language. | +| **VALIDATE_GROOVY** | `true` | Flag to enable or disable the linting process of the language. | +| **VALIDATE_HTML** | `true` | Flag to enable or disable the linting process of the HTML language. | +| **VALIDATE_JAVA** | `true` | Flag to enable or disable the linting process of the language. | +| **VALIDATE_JAVASCRIPT_ES** | `true` | Flag to enable or disable the linting process of the Javascript language. (Utilizing: eslint) | +| **VALIDATE_JAVASCRIPT_STANDARD** | `true` | Flag to enable or disable the linting process of the Javascript language. (Utilizing: standard) | +| **VALIDATE_JSON** | `true` | Flag to enable or disable the linting process of the JSON language. | +| **VALIDATE_JSX** | `true` | Flag to enable or disable the linting process for jsx files (Utilizing: eslint) | +| **VALIDATE_KOTLIN** | `true` | Flag to enable or disable the linting process of the Kotlin language. | +| **VALIDATE_LUA** | `true` | Flag to enable or disable the linting process of the language. | +| **VALIDATE_MD** | `true` | Flag to enable or disable the linting process of the Markdown language. | +| **VALIDATE_OPENAPI** | `true` | Flag to enable or disable the linting process of the OpenAPI language. | +| **VALIDATE_PERL** | `true` | Flag to enable or disable the linting process of the Perl language. | +| **VALIDATE_PHP** | `true` | Flag to enable or disable the linting process of the PHP language. (Utilizing: PHP built-in linter) (keep for backward compatibility) | +| **VALIDATE_PHP_BUILTIN** | `true` | Flag to enable or disable the linting process of the PHP language. (Utilizing: PHP built-in linter) | +| **VALIDATE_PHP_PHPCS** | `true` | Flag to enable or disable the linting process of the PHP language. (Utilizing: PHP CodeSniffer) | +| **VALIDATE_PHP_PHPSTAN** | `true` | Flag to enable or disable the linting process of the PHP language. (Utilizing: PHPStan) | +| **VALIDATE_PHP_PSALM** | `true` | Flag to enable or disable the linting process of the PHP language. (Utilizing: PSalm) | +| **VALIDATE_PROTOBUF** | `true` | Flag to enable or disable the linting process of the Protobuf language. | +| **VALIDATE_PYTHON** | `true` | Flag to enable or disable the linting process of the Python language. (Utilizing: pylint) (keep for backward compatibility) | +| **VALIDATE_PYTHON_PYLINT** | `true` | Flag to enable or disable the linting process of the Python language. (Utilizing: pylint) | +| **VALIDATE_PYTHON_FLAKE8** | `true` | Flag to enable or disable the linting process of the Python language. (Utilizing: flake8) | +| **VALIDATE_POWERSHELL** | `true` | Flag to enable or disable the linting process of the Powershell language. | +| **VALIDATE_RAKU** | `true` | Flag to enable or disable the linting process of the Raku language. | +| **VALIDATE_RUBY** | `true` | Flag to enable or disable the linting process of the Ruby language. | +| **VALIDATE_STATES** | `true` | Flag to enable or disable the linting process for AWS States Language. | +| **VALIDATE_TERRAFORM** | `true` | Flag to enable or disable the linting process of the Terraform language. | +| **VALIDATE_TERRAFORM_TERRASCAN** | `false` | Flag to enable or disable the linting process of the Terraform language for security related issues. | +| **VALIDATE_TSX** | `true` | Flag to enable or disable the linting process for tsx files (Utilizing: eslint) | +| **VALIDATE_TYPESCRIPT_ES** | `true` | Flag to enable or disable the linting process of the Typescript language. (Utilizing: eslint) | +| **VALIDATE_TYPESCRIPT_STANDARD** | `true` | Flag to enable or disable the linting process of the Typescript language. (Utilizing: standard) | +| **VALIDATE_XML** | `true` | Flag to enable or disable the linting process of the XML language. | +| **VALIDATE_YAML** | `true` | Flag to enable or disable the linting process of the YAML language. | +| **YAML_CONFIG_FILE** | `.yaml-lint.yml` | Filename for [Yamllint configuration](https://yamllint.readthedocs.io/en/stable/configuration.html) (ex: `.yaml-lint.yml`, `.yamllint.yml`) | ### Template rules files diff --git a/TEMPLATES/.flake8 b/TEMPLATES/.flake8 new file mode 100644 index 00000000..6deafc26 --- /dev/null +++ b/TEMPLATES/.flake8 @@ -0,0 +1,2 @@ +[flake8] +max-line-length = 120 diff --git a/TEMPLATES/.groovylintrc.json b/TEMPLATES/.groovylintrc.json new file mode 100644 index 00000000..474f8151 --- /dev/null +++ b/TEMPLATES/.groovylintrc.json @@ -0,0 +1,65 @@ +{ + "extends": "recommended", + "rules": { + "CatchException": { + "enabled": false + }, + "CatchThrowable": { + "enabled": false + }, + "ClassJavadoc": { + "enabled": false + }, + "ClosureAsLastMethodParameter": { + "enabled": false + }, + "DuplicateNumberLiteral": { + "enabled": false + }, + "DuplicateStringLiteral": { + "enabled": false + }, + "FieldTypeRequired": { + "enabled": false + }, + "JavaIoPackageAccess": { + "enabled": false + }, + "MethodParameterTypeRequired": { + "enabled": false + }, + "MethodSize": { + "enabled": false + }, + "NoDef": { + "enabled": false + }, + "PrintStackTrace": { + "enabled": false + }, + "PropertyName": { + "enabled": false + }, + "SpaceAroundMapEntryColon": { + "enabled": false + }, + "SystemExit": { + "enabled": false + }, + "UnnecessaryGetter": { + "enabled": false + }, + "UnnecessaryObjectReferences": { + "enabled": false + }, + "UnnecessarySetter": { + "enabled": false + }, + "VariableName": { + "enabled": false + }, + "VariableTypeRequired": { + "enabled": false + } + } +} diff --git a/TEMPLATES/.luacheckrc b/TEMPLATES/.luacheckrc new file mode 100644 index 00000000..00aa308f --- /dev/null +++ b/TEMPLATES/.luacheckrc @@ -0,0 +1 @@ +--std max diff --git a/TEMPLATES/analysis_options.yaml b/TEMPLATES/analysis_options.yaml new file mode 100644 index 00000000..0c444f44 --- /dev/null +++ b/TEMPLATES/analysis_options.yaml @@ -0,0 +1,57 @@ +--- +########################## +########################## +## Dart Linter rules ## +########################## +########################## + +# Pedantic Rules +# https://github.com/dart-lang/pedantic + +linter: + rules: + - always_declare_return_types + - always_require_non_null_named_parameters + - annotate_overrides + - avoid_empty_else + - avoid_init_to_null + - avoid_null_checks_in_equality_operators + - avoid_relative_lib_imports + - avoid_return_types_on_setters + - avoid_shadowing_type_parameters + - avoid_types_as_parameter_names + - camel_case_extensions + - curly_braces_in_flow_control_structures + - empty_catches + - empty_constructor_bodies + - library_names + - library_prefixes + - no_duplicate_case_values + - null_closures + - omit_local_variable_types + - prefer_adjacent_string_concatenation + - prefer_collection_literals + - prefer_conditional_assignment + - prefer_contains + - prefer_equal_for_default_values + - prefer_final_fields + - prefer_for_elements_to_map_fromIterable + - prefer_generic_function_type_aliases + - prefer_if_null_operators + - prefer_is_empty + - prefer_is_not_empty + - prefer_iterable_whereType + - prefer_single_quotes + - prefer_spread_collections + - recursive_getters + - slash_for_doc_comments + - type_init_formals + - unawaited_futures + - unnecessary_const + - unnecessary_new + - unnecessary_null_in_if_null_operators + - unnecessary_this + - unrelated_type_equality_checks + - use_function_type_syntax_for_parameters + - use_rethrow_when_possible + - valid_regexps diff --git a/TEMPLATES/phpcs.xml b/TEMPLATES/phpcs.xml new file mode 100644 index 00000000..db39fed5 --- /dev/null +++ b/TEMPLATES/phpcs.xml @@ -0,0 +1,6 @@ + + + + The default coding standard for usage with GitHub Super-Linter. It just includes PSR12. + + diff --git a/TEMPLATES/phpstan.neon b/TEMPLATES/phpstan.neon new file mode 100644 index 00000000..069eb1c9 --- /dev/null +++ b/TEMPLATES/phpstan.neon @@ -0,0 +1,2 @@ +parameters: + level: 5 diff --git a/TEMPLATES/psalm.xml b/TEMPLATES/psalm.xml new file mode 100644 index 00000000..0eb2e126 --- /dev/null +++ b/TEMPLATES/psalm.xml @@ -0,0 +1,4 @@ + + + + diff --git a/dependencies/Gemfile b/dependencies/Gemfile index ab2a0684..ea9d82b6 100644 --- a/dependencies/Gemfile +++ b/dependencies/Gemfile @@ -8,3 +8,4 @@ gem "rubocop", "~> 0.82.0" gem "rubocop-github", "~> 0.16.0" gem "rubocop-performance", "~>1.7.1" gem "rubocop-rails", "~> 2.5" +gem "rubocop-rspec", "~> 1.41.0" diff --git a/dependencies/Gemfile.lock b/dependencies/Gemfile.lock index 12f9f0d7..076e8a5e 100644 --- a/dependencies/Gemfile.lock +++ b/dependencies/Gemfile.lock @@ -9,7 +9,7 @@ GEM zeitwerk (~> 2.2, >= 2.2.2) ast (2.4.1) concurrent-ruby (1.1.6) - i18n (1.8.3) + i18n (1.8.4) concurrent-ruby (~> 1.0) jaro_winkler (1.5.4) minitest (5.14.1) @@ -37,6 +37,8 @@ GEM activesupport (>= 4.2.0) rack (>= 1.1) rubocop (>= 0.82.0) + rubocop-rspec (1.41.0) + rubocop (>= 0.68.1) ruby-progressbar (1.10.1) thread_safe (0.3.6) tzinfo (1.2.7) @@ -52,6 +54,7 @@ DEPENDENCIES rubocop-github (~> 0.16.0) rubocop-performance (~> 1.7.1) rubocop-rails (~> 2.5) + rubocop-rspec (~> 1.41.0) BUNDLED WITH 2.1.4 diff --git a/dependencies/Pipfile b/dependencies/Pipfile index 2fce4271..0fcce921 100644 --- a/dependencies/Pipfile +++ b/dependencies/Pipfile @@ -10,7 +10,8 @@ yamllint = "*" pylint = "*" yq = "*" cfn-lint = "*" -shyaml = "*" +terrascan = "*" +flake8 = "*" [requires] python_version = "3.8" diff --git a/dependencies/Pipfile.lock b/dependencies/Pipfile.lock index 9ddf4df3..e8e7a7e8 100644 --- a/dependencies/Pipfile.lock +++ b/dependencies/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "f8d7f08c1efbacea7c92868babd54bc040413f865e3cd7ea8d4bebab310b3da3" + "sha256": "f8ea3853c4bb4533103043533d08982436551678c827f59809c94bf0ee54a187" }, "pipfile-spec": 6, "requires": { @@ -47,24 +47,25 @@ }, "boto3": { "hashes": [ - "sha256:07bd0872e9178b637baefb82aff8abb76197770c9fc60c4d6575564ba878e3e4" + "sha256:726937b33b5bf6036a3889ea6ecad632439d1a53c3dd4497c1c426d348e2dae3", + "sha256:781f5d1bbec6c2fe902e8855c1c8a576845eaa06630e817b0e422afa4788620e" ], - "version": "==1.14.22" + "version": "==1.14.34" }, "botocore": { "hashes": [ - "sha256:4d084dfcfcdf21ac2df17d017607ca53d53ac6c2fa17484cdd87ef78daba06b8", - "sha256:f491d3c29d7dda8c8907c520bc96d77a67a8953dfed7f55c250799849e213640" + "sha256:8170f6a236cdfd053275be7b2f1531c90c517d903d38b21d064dc6ba23f20870", + "sha256:ff39ec54893397df3c14dd516aedeaff12bb7c363051d8b9bd5fc86bc3e68231" ], - "version": "==1.17.22" + "version": "==1.17.34" }, "cfn-lint": { "hashes": [ - "sha256:443e7c1a57a8909050b51873cbf53628e253b6a2ab00fba9d25f89e75f13f1b6", - "sha256:b2a7b9a84688d87d0d49d1dad2602382ba2a8be9d20d87278f4d42c59f71eddc" + "sha256:85df66deca0319003b4af3efbd4689e5004608b4e9ee7cc54c7a27e5c0ca1685", + "sha256:f7c63a4bf6c32c56cbe1af023ff93eb88a4bad784368dcb25724941981e92f16" ], "index": "pypi", - "version": "==0.34.0" + "version": "==0.34.1" }, "decorator": { "hashes": [ @@ -81,6 +82,14 @@ ], "version": "==0.15.2" }, + "flake8": { + "hashes": [ + "sha256:15e351d19611c887e482fb960eae4d44845013cc142d42896e9862f775d8cf5c", + "sha256:f04b9fcbac03b0a3e58c0ab3a0ecc462e023a9faf046d57794184028123aa208" + ], + "index": "pypi", + "version": "==3.8.3" + }, "isort": { "hashes": [ "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1", @@ -171,6 +180,26 @@ ], "version": "==0.8.0" }, + "pycodestyle": { + "hashes": [ + "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367", + "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e" + ], + "version": "==2.6.0" + }, + "pyflakes": { + "hashes": [ + "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92", + "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8" + ], + "version": "==2.2.0" + }, + "pyhcl": { + "hashes": [ + "sha256:2d9b9dcdf1023d812bfed561ba72c99104c5b3f52e558d595130a44ce081b003" + ], + "version": "==0.4.4" + }, "pylint": { "hashes": [ "sha256:7dd78437f2d8d019717dbf287772d0b2dbdfd13fc016aa7faa08d67bccc46adc", @@ -216,14 +245,6 @@ ], "version": "==0.3.3" }, - "shyaml": { - "hashes": [ - "sha256:3a57e380f66043c661d417106a0f101f8068c80caa2afef57c90447b88526c3d", - "sha256:ac9066eed5b8445de1f83a99106ca96a77900b6873de327fd50d3e3102084752" - ], - "index": "pypi", - "version": "==0.6.1" - }, "six": { "hashes": [ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", @@ -231,6 +252,14 @@ ], "version": "==1.15.0" }, + "terrascan": { + "hashes": [ + "sha256:2003638e2e38feba9215df3add2ee99565731b86dbd5c43fd8982b1a4ddac927", + "sha256:b44d8c7eac96aa8094865061783ab0e8e849690b8187b75778caf5dd34002d18" + ], + "index": "pypi", + "version": "==0.2.3" + }, "toml": { "hashes": [ "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f", @@ -240,11 +269,11 @@ }, "urllib3": { "hashes": [ - "sha256:3018294ebefce6572a474f0604c2021e33b3fd8006ecd11d62107a5d2a963527", - "sha256:88206b0eb87e6d677d424843ac5209e3fb9d0190d0ee169599165ec25e9d9115" + "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a", + "sha256:e7983572181f5e1522d9c98453462384ee92a0be7fac5f1413a1e35c56cc0461" ], "markers": "python_version != '3.4'", - "version": "==1.25.9" + "version": "==1.25.10" }, "wrapt": { "hashes": [ diff --git a/dependencies/package-lock.json b/dependencies/package-lock.json index cb0600bd..07207187 100644 --- a/dependencies/package-lock.json +++ b/dependencies/package-lock.json @@ -3,211 +3,295 @@ "requires": true, "lockfileVersion": 1, "dependencies": { - "@babel/code-frame": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.3.tgz", - "integrity": "sha512-fDx9eNW0qz0WkUeqL6tXEXzVlPh6Y5aCDEZesl0xBGA8ndRukX91Uk44ZqnkECp01NAZUdCAl+aiQNGi0k88Eg==", + "@amplitude/node": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@amplitude/node/-/node-0.3.3.tgz", + "integrity": "sha512-Uzg4MRAuD053Ex67Iu2lm2GovnVte1uKI3q7CXlMCYZ9ylZmAkPbTnjg9OVyD4f+IiUfgK4p3bE7r9p7jqSDLA==", "requires": { - "@babel/highlight": "^7.10.3" + "@amplitude/types": "^0.3.2", + "tslib": "^1.9.3" + } + }, + "@amplitude/types": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@amplitude/types/-/types-0.3.2.tgz", + "integrity": "sha512-7+m7nhJMFGbpsppOUsCH8f4FOFyAxgKFuXkKknU/LP2CMYVjWEIoLTKKgaJPc2c8wXaK5KPXVetb8VeiGbuaGg==" + }, + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "requires": { + "@babel/highlight": "^7.10.4" } }, "@babel/core": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.3.tgz", - "integrity": "sha512-5YqWxYE3pyhIi84L84YcwjeEgS+fa7ZjK6IBVGTjDVfm64njkR2lfDhVR5OudLk8x2GK59YoSyVv+L/03k1q9w==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.10.5.tgz", + "integrity": "sha512-O34LQooYVDXPl7QWCdW9p4NR+QlzOr7xShPPJz8GsuCU3/8ua/wqTr7gmnxXv+WBESiGU/G5s16i6tUvHkNb+w==", "requires": { - "@babel/code-frame": "^7.10.3", - "@babel/generator": "^7.10.3", - "@babel/helper-module-transforms": "^7.10.1", - "@babel/helpers": "^7.10.1", - "@babel/parser": "^7.10.3", - "@babel/template": "^7.10.3", - "@babel/traverse": "^7.10.3", - "@babel/types": "^7.10.3", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.10.5", + "@babel/helper-module-transforms": "^7.10.5", + "@babel/helpers": "^7.10.4", + "@babel/parser": "^7.10.5", + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.5", + "@babel/types": "^7.10.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.1", "json5": "^2.1.2", - "lodash": "^4.17.13", + "lodash": "^4.17.19", "resolve": "^1.3.2", "semver": "^5.4.1", "source-map": "^0.5.0" }, "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + }, "semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" } } }, "@babel/generator": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.3.tgz", - "integrity": "sha512-drt8MUHbEqRzNR0xnF8nMehbY11b1SDkRw03PSNH/3Rb2Z35oxkddVSi3rcaak0YJQ86PCuE7Qx1jSFhbLNBMA==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.10.5.tgz", + "integrity": "sha512-3vXxr3FEW7E7lJZiWQ3bM4+v/Vyr9C+hpolQ8BGFr9Y8Ri2tFLWTixmwKBafDujO1WVah4fhZBeU1bieKdghig==", "requires": { - "@babel/types": "^7.10.3", + "@babel/types": "^7.10.5", "jsesc": "^2.5.1", - "lodash": "^4.17.13", "source-map": "^0.5.0" + }, + "dependencies": { + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + } } }, "@babel/helper-function-name": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.3.tgz", - "integrity": "sha512-FvSj2aiOd8zbeqijjgqdMDSyxsGHaMt5Tr0XjQsGKHD3/1FP3wksjnLAWzxw7lvXiej8W1Jt47SKTZ6upQNiRw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.10.4.tgz", + "integrity": "sha512-YdaSyz1n8gY44EmN7x44zBn9zQ1Ry2Y+3GTA+3vH6Mizke1Vw0aWDM66FOYEPw8//qKkmqOckrGgTYa+6sceqQ==", "requires": { - "@babel/helper-get-function-arity": "^7.10.3", - "@babel/template": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/helper-get-function-arity": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-get-function-arity": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.3.tgz", - "integrity": "sha512-iUD/gFsR+M6uiy69JA6fzM5seno8oE85IYZdbVVEuQaZlEzMO2MXblh+KSPJgsZAUx0EEbWXU0yJaW7C9CdAVg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.10.4.tgz", + "integrity": "sha512-EkN3YDB+SRDgiIUnNgcmiD361ti+AVbL3f3Henf6dqqUyr5dMsorno0lJWJuLhDhkI5sYEpgj6y9kB8AOU1I2A==", "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-member-expression-to-functions": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.3.tgz", - "integrity": "sha512-q7+37c4EPLSjNb2NmWOjNwj0+BOyYlssuQ58kHEWk1Z78K5i8vTUsteq78HMieRPQSl/NtpQyJfdjt3qZ5V2vw==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.10.5.tgz", + "integrity": "sha512-HiqJpYD5+WopCXIAbQDG0zye5XYVvcO9w/DHp5GsaGkRUaamLj2bEtu6i8rnGGprAhHM3qidCMgp71HF4endhA==", "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.10.5" } }, "@babel/helper-module-imports": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.3.tgz", - "integrity": "sha512-Jtqw5M9pahLSUWA+76nhK9OG8nwYXzhQzVIGFoNaHnXF/r4l7kz4Fl0UAW7B6mqC5myoJiBP5/YQlXQTMfHI9w==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.10.4.tgz", + "integrity": "sha512-nEQJHqYavI217oD9+s5MUBzk6x1IlvoS9WTPfgG43CbMEeStE0v+r+TucWdx8KFGowPGvyOkDT9+7DHedIDnVw==", "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-module-transforms": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.1.tgz", - "integrity": "sha512-RLHRCAzyJe7Q7sF4oy2cB+kRnU4wDZY/H2xJFGof+M+SJEGhZsb+GFj5j1AD8NiSaVBJ+Pf0/WObiXu/zxWpFg==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.10.5.tgz", + "integrity": "sha512-4P+CWMJ6/j1W915ITJaUkadLObmCRRSC234uctJfn/vHrsLNxsR8dwlcXv9ZhJWzl77awf+mWXSZEKt5t0OnlA==", "requires": { - "@babel/helper-module-imports": "^7.10.1", - "@babel/helper-replace-supers": "^7.10.1", - "@babel/helper-simple-access": "^7.10.1", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1", - "lodash": "^4.17.13" + "@babel/helper-module-imports": "^7.10.4", + "@babel/helper-replace-supers": "^7.10.4", + "@babel/helper-simple-access": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.5", + "lodash": "^4.17.19" + }, + "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + } } }, "@babel/helper-optimise-call-expression": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.3.tgz", - "integrity": "sha512-kT2R3VBH/cnSz+yChKpaKRJQJWxdGoc6SjioRId2wkeV3bK0wLLioFpJROrX0U4xr/NmxSSAWT/9Ih5snwIIzg==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.10.4.tgz", + "integrity": "sha512-n3UGKY4VXwXThEiKrgRAoVPBMqeoPgHVqiHZOanAJCG9nQUL2pLRQirUzl0ioKclHGpGqRgIOkgcIJaIWLpygg==", "requires": { - "@babel/types": "^7.10.3" + "@babel/types": "^7.10.4" } }, "@babel/helper-replace-supers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.1.tgz", - "integrity": "sha512-SOwJzEfpuQwInzzQJGjGaiG578UYmyi2Xw668klPWV5n07B73S0a9btjLk/52Mlcxa+5AdIYqws1KyXRfMoB7A==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.10.4.tgz", + "integrity": "sha512-sPxZfFXocEymYTdVK1UNmFPBN+Hv5mJkLPsYWwGBxZAxaWfFu+xqp7b6qWD0yjNuNL2VKc6L5M18tOXUP7NU0A==", "requires": { - "@babel/helper-member-expression-to-functions": "^7.10.1", - "@babel/helper-optimise-call-expression": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/helper-member-expression-to-functions": "^7.10.4", + "@babel/helper-optimise-call-expression": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-simple-access": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.1.tgz", - "integrity": "sha512-VSWpWzRzn9VtgMJBIWTZ+GP107kZdQ4YplJlCmIrjoLVSi/0upixezHCDG8kpPVTBJpKfxTH01wDhh+jS2zKbw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.10.4.tgz", + "integrity": "sha512-0fMy72ej/VEvF8ULmX6yb5MtHG4uH4Dbd6I/aHDb/JVg0bbivwt9Wg+h3uMvX+QSFtwr5MeItvazbrc4jtRAXw==", "requires": { - "@babel/template": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/template": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/helper-split-export-declaration": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.1.tgz", - "integrity": "sha512-UQ1LVBPrYdbchNhLwj6fetj46BcFwfS4NllJo/1aJsT+1dLTEnXJL0qHqtY7gPzF8S2fXBJamf1biAXV3X077g==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.10.4.tgz", + "integrity": "sha512-pySBTeoUff56fL5CBU2hWm9TesA4r/rOkI9DyJLvvgz09MB9YtfIYe3iBriVaYNaPe+Alua0vBIOVOLs2buWhg==", "requires": { - "@babel/types": "^7.10.1" + "@babel/types": "^7.10.4" } }, "@babel/helper-validator-identifier": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.3.tgz", - "integrity": "sha512-bU8JvtlYpJSBPuj1VUmKpFGaDZuLxASky3LhaKj3bmpSTY6VWooSM8msk+Z0CZoErFye2tlABF6yDkT3FOPAXw==" + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==" }, "@babel/helpers": { - "version": "7.10.1", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.1.tgz", - "integrity": "sha512-muQNHF+IdU6wGgkaJyhhEmI54MOZBKsFfsXFhboz1ybwJ1Kl7IHlbm2a++4jwrmY5UYsgitt5lfqo1wMFcHmyw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.10.4.tgz", + "integrity": "sha512-L2gX/XeUONeEbI78dXSrJzGdz4GQ+ZTA/aazfUsFaWjSe95kiCuOZ5HsXvkiw3iwF+mFHSRUfJU8t6YavocdXA==", "requires": { - "@babel/template": "^7.10.1", - "@babel/traverse": "^7.10.1", - "@babel/types": "^7.10.1" + "@babel/template": "^7.10.4", + "@babel/traverse": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/highlight": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.3.tgz", - "integrity": "sha512-Ih9B/u7AtgEnySE2L2F0Xm0GaM729XqqLfHkalTsbjXGyqmf/6M0Cu0WpvqueUlW+xk88BHw9Nkpj49naU+vWw==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", "requires": { - "@babel/helper-validator-identifier": "^7.10.3", + "@babel/helper-validator-identifier": "^7.10.4", "chalk": "^2.0.0", "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + } } }, "@babel/parser": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.3.tgz", - "integrity": "sha512-oJtNJCMFdIMwXGmx+KxuaD7i3b8uS7TTFYW/FNG2BT8m+fmGHoiPYoH0Pe3gya07WuFmM5FCDIr1x0irkD/hyA==" + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.10.5.tgz", + "integrity": "sha512-wfryxy4bE1UivvQKSQDU4/X6dr+i8bctjUjj8Zyt3DQy7NtPizJXT8M52nqpNKL+nq2PW8lxk4ZqLj0fD4B4hQ==" }, "@babel/runtime": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.4.tgz", - "integrity": "sha512-UpTN5yUJr9b4EX2CnGNWIvER7Ab83ibv0pcvvHc4UOdrBI5jb8bj+32cCwPX6xu0mt2daFNjYhoi+X7beH0RSw==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.10.5.tgz", + "integrity": "sha512-otddXKhdNn7d0ptoFRHtMLa8LqDxLYwTjB4nYgM1yy5N6gU/MUf8zqyyLltCH3yAVitBzmwK4us+DD0l/MauAg==", "requires": { "regenerator-runtime": "^0.13.4" } }, "@babel/template": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.3.tgz", - "integrity": "sha512-5BjI4gdtD+9fHZUsaxPHPNpwa+xRkDO7c7JbhYn2afvrkDu5SfAAbi9AIMXw2xEhO/BR35TqiW97IqNvCo/GqA==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz", + "integrity": "sha512-ZCjD27cGJFUB6nmCB1Enki3r+L5kJveX9pq1SvAUKoICy6CZ9yD8xO086YXdYhvNjBdnekm4ZnaP5yC8Cs/1tA==", "requires": { - "@babel/code-frame": "^7.10.3", - "@babel/parser": "^7.10.3", - "@babel/types": "^7.10.3" + "@babel/code-frame": "^7.10.4", + "@babel/parser": "^7.10.4", + "@babel/types": "^7.10.4" } }, "@babel/traverse": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.3.tgz", - "integrity": "sha512-qO6623eBFhuPm0TmmrUFMT1FulCmsSeJuVGhiLodk2raUDFhhTECLd9E9jC4LBIWziqt4wgF6KuXE4d+Jz9yug==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.10.5.tgz", + "integrity": "sha512-yc/fyv2gUjPqzTz0WHeRJH2pv7jA9kA7mBX2tXl/x5iOE81uaVPuGPtaYk7wmkx4b67mQ7NqI8rmT2pF47KYKQ==", "requires": { - "@babel/code-frame": "^7.10.3", - "@babel/generator": "^7.10.3", - "@babel/helper-function-name": "^7.10.3", - "@babel/helper-split-export-declaration": "^7.10.1", - "@babel/parser": "^7.10.3", - "@babel/types": "^7.10.3", + "@babel/code-frame": "^7.10.4", + "@babel/generator": "^7.10.5", + "@babel/helper-function-name": "^7.10.4", + "@babel/helper-split-export-declaration": "^7.10.4", + "@babel/parser": "^7.10.5", + "@babel/types": "^7.10.5", "debug": "^4.1.0", "globals": "^11.1.0", - "lodash": "^4.17.13" + "lodash": "^4.17.19" + }, + "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + } } }, "@babel/types": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.3.tgz", - "integrity": "sha512-nZxaJhBXBQ8HVoIcGsf9qWep3Oh3jCENK54V4mRF7qaJabVsAYdbTtmSD8WmAp1R6ytPiu5apMwSXyxB1WlaBA==", + "version": "7.10.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.10.5.tgz", + "integrity": "sha512-ixV66KWfCI6GKoA/2H9v6bQdbfXEwwpOdQ8cRvb4F+eyvhlaHxWFMQB4+3d9QFJXZsiiiqVrewNV0DFEQpyT4Q==", "requires": { - "@babel/helper-validator-identifier": "^7.10.3", - "lodash": "^4.17.13", + "@babel/helper-validator-identifier": "^7.10.4", + "lodash": "^4.17.19", "to-fast-properties": "^2.0.0" + }, + "dependencies": { + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + } } }, "@coffeelint/cli": { @@ -221,31 +305,6 @@ "resolve": "^1.17.0", "strip-json-comments": "^3.1.1", "yargs": "^15.4.1" - }, - "dependencies": { - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" - }, - "yargs": { - "version": "15.4.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", - "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", - "requires": { - "cliui": "^6.0.0", - "decamelize": "^1.2.0", - "find-up": "^4.1.0", - "get-caller-file": "^2.0.1", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^4.2.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^18.1.2" - } - } } }, "@nodelib/fs.scandir": { @@ -352,44 +411,23 @@ "yargs": "15.3.1" }, "dependencies": { - "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", + "yargs": { + "version": "15.3.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", + "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.1" } - }, - "fast-glob": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.1.0.tgz", - "integrity": "sha512-TrUz3THiq2Vy3bjfQUB2wNyPdGBeGmdjbzzBLhfHN4YFurYptCKwGq/TfiRavbGywFRzY6U2CdmQ1zmsY5yYaw==", - "requires": { - "@nodelib/fs.stat": "^2.0.2", - "@nodelib/fs.walk": "^1.2.3", - "glob-parent": "^5.1.0", - "merge2": "^1.3.0", - "micromatch": "^4.0.2" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "tslib": { - "version": "1.11.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", - "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==" } } }, @@ -418,9 +456,9 @@ "integrity": "sha512-PdY8p2Ufgtorf4d2DbKMfknILMa8KwuyyMMR/2lgK1mLaU8F5PKWYc+h9hIzC+ar0bh7m9h2rINo32m7ADfVyA==" }, "@stylelint/postcss-css-in-js": { - "version": "0.37.1", - "resolved": "https://registry.npmjs.org/@stylelint/postcss-css-in-js/-/postcss-css-in-js-0.37.1.tgz", - "integrity": "sha512-UMf2Rni3JGKi3ZwYRGMYJ5ipOA5ENJSKMtYA/pE1ZLURwdh7B5+z2r73RmWvub+N0UuH1Lo+TGfCgYwPvqpXNw==", + "version": "0.37.2", + "resolved": "https://registry.npmjs.org/@stylelint/postcss-css-in-js/-/postcss-css-in-js-0.37.2.tgz", + "integrity": "sha512-nEhsFoJurt8oUmieT8qy4nk81WRHmJynmVwn/Vts08PL9fhgIsMhk1GId5yAN643OzqEEb5S/6At2TZW7pqPDA==", "requires": { "@babel/core": ">=7.9.0" } @@ -475,11 +513,11 @@ "integrity": "sha512-/tiJyrc0GPcsReHzgC0SXwOmoPjLqYe01W7dLYB0yasQXMbcRee+ZIk+g8MIQhoBS8fPoBQO3Y93+aeBrI93Ug==" }, "@typescript-eslint/eslint-plugin": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.7.0.tgz", - "integrity": "sha512-4OEcPON3QIx0ntsuiuFP/TkldmBGXf0uKxPQlGtS/W2F3ndYm8Vgdpj/woPJkzUc65gd3iR+qi3K8SDQP/obFg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.8.0.tgz", + "integrity": "sha512-lFb4VCDleFSR+eo4Ew+HvrJ37ZH1Y9ZyE+qyP7EiwBpcCVxwmUc5PAqhShCQ8N8U5vqYydm74nss+a0wrrCErw==", "requires": { - "@typescript-eslint/experimental-utils": "3.7.0", + "@typescript-eslint/experimental-utils": "3.8.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "regexpp": "^3.0.0", @@ -488,53 +526,83 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.7.0.tgz", - "integrity": "sha512-xpfXXAfZqhhqs5RPQBfAFrWDHoNxD5+sVB5A46TF58Bq1hRfVROrWHcQHHUM9aCBdy9+cwATcvCbRg8aIRbaHQ==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.8.0.tgz", + "integrity": "sha512-o8T1blo1lAJE0QDsW7nSyvZHbiDzQDjINJKyB44Z3sSL39qBy5L10ScI/XwDtaiunoyKGLiY9bzRk4YjsUZl8w==", "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.7.0", - "@typescript-eslint/typescript-estree": "3.7.0", - "eslint-scope": "^5.0.0", - "eslint-utils": "^2.0.0" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.7.0.tgz", - "integrity": "sha512-xpfXXAfZqhhqs5RPQBfAFrWDHoNxD5+sVB5A46TF58Bq1hRfVROrWHcQHHUM9aCBdy9+cwATcvCbRg8aIRbaHQ==", - "requires": { - "@types/json-schema": "^7.0.3", - "@typescript-eslint/types": "3.7.0", - "@typescript-eslint/typescript-estree": "3.7.0", + "@typescript-eslint/types": "3.8.0", + "@typescript-eslint/typescript-estree": "3.8.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.7.0.tgz", - "integrity": "sha512-2LZauVUt7jAWkcIW7djUc3kyW+fSarNEuM3RF2JdLHR9BfX/nDEnyA4/uWz0wseoWVZbDXDF7iF9Jc342flNqQ==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.8.0.tgz", + "integrity": "sha512-u5vjOBaCsnMVQOvkKCXAmmOhyyMmFFf5dbkM3TIbg3MZ2pyv5peE4gj81UAbTHwTOXEwf7eCQTUMKrDl/+qGnA==", "requires": { "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "3.7.0", - "@typescript-eslint/types": "3.7.0", - "@typescript-eslint/typescript-estree": "3.7.0", + "@typescript-eslint/experimental-utils": "3.8.0", + "@typescript-eslint/types": "3.8.0", + "@typescript-eslint/typescript-estree": "3.8.0", "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.8.0.tgz", + "integrity": "sha512-o8T1blo1lAJE0QDsW7nSyvZHbiDzQDjINJKyB44Z3sSL39qBy5L10ScI/XwDtaiunoyKGLiY9bzRk4YjsUZl8w==", + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/types": "3.8.0", + "@typescript-eslint/typescript-estree": "3.8.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/types": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.8.0.tgz", + "integrity": "sha512-8kROmEQkv6ss9kdQ44vCN1dTrgu4Qxrd2kXr10kz2NP5T8/7JnEfYNxCpPkArbLIhhkGLZV3aVMplH1RXQRF7Q==" + }, + "@typescript-eslint/typescript-estree": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.8.0.tgz", + "integrity": "sha512-MTv9nPDhlKfclwnplRNDL44mP2SY96YmPGxmMbMy6x12I+pERcxpIUht7DXZaj4mOKKtet53wYYXU0ABaiXrLw==", + "requires": { + "@typescript-eslint/types": "3.8.0", + "@typescript-eslint/visitor-keys": "3.8.0", + "debug": "^4.1.1", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.8.0.tgz", + "integrity": "sha512-gfqQWyVPpT9NpLREXNR820AYwgz+Kr1GuF3nf1wxpHD6hdxI62tq03ToomFnDxY0m3pUB39IF7sil7D5TQexLA==", + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + } } }, "@typescript-eslint/types": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.7.0.tgz", - "integrity": "sha512-reCaK+hyKkKF+itoylAnLzFeNYAEktB0XVfSQvf0gcVgpz1l49Lt6Vo9x4MVCCxiDydA0iLAjTF/ODH0pbfnpg==" + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.8.0.tgz", + "integrity": "sha512-8kROmEQkv6ss9kdQ44vCN1dTrgu4Qxrd2kXr10kz2NP5T8/7JnEfYNxCpPkArbLIhhkGLZV3aVMplH1RXQRF7Q==" }, "@typescript-eslint/typescript-estree": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.7.0.tgz", - "integrity": "sha512-xr5oobkYRebejlACGr1TJ0Z/r0a2/HUf0SXqPvlgUMwiMqOCu/J+/Dr9U3T0IxpE5oLFSkqMx1FE/dKaZ8KsOQ==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.8.0.tgz", + "integrity": "sha512-MTv9nPDhlKfclwnplRNDL44mP2SY96YmPGxmMbMy6x12I+pERcxpIUht7DXZaj4mOKKtet53wYYXU0ABaiXrLw==", "requires": { - "@typescript-eslint/types": "3.7.0", - "@typescript-eslint/visitor-keys": "3.7.0", + "@typescript-eslint/types": "3.8.0", + "@typescript-eslint/visitor-keys": "3.8.0", "debug": "^4.1.1", "glob": "^7.1.6", "is-glob": "^4.0.1", @@ -544,37 +612,9 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.7.0.tgz", - "integrity": "sha512-k5PiZdB4vklUpUX4NBncn5RBKty8G3ihTY+hqJsCdMuD0v4jofI5xuqwnVcWxfv6iTm2P/dfEa2wMUnsUY8ODw==", - "requires": { - "eslint-visitor-keys": "^1.1.0" - } - }, - "@typescript-eslint/types": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.7.0.tgz", - "integrity": "sha512-reCaK+hyKkKF+itoylAnLzFeNYAEktB0XVfSQvf0gcVgpz1l49Lt6Vo9x4MVCCxiDydA0iLAjTF/ODH0pbfnpg==" - }, - "@typescript-eslint/typescript-estree": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.7.0.tgz", - "integrity": "sha512-xr5oobkYRebejlACGr1TJ0Z/r0a2/HUf0SXqPvlgUMwiMqOCu/J+/Dr9U3T0IxpE5oLFSkqMx1FE/dKaZ8KsOQ==", - "requires": { - "@typescript-eslint/types": "3.7.0", - "@typescript-eslint/visitor-keys": "3.7.0", - "debug": "^4.1.1", - "glob": "^7.1.6", - "is-glob": "^4.0.1", - "lodash": "^4.17.15", - "semver": "^7.3.2", - "tsutils": "^3.17.1" - } - }, - "@typescript-eslint/visitor-keys": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.7.0.tgz", - "integrity": "sha512-k5PiZdB4vklUpUX4NBncn5RBKty8G3ihTY+hqJsCdMuD0v4jofI5xuqwnVcWxfv6iTm2P/dfEa2wMUnsUY8ODw==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.8.0.tgz", + "integrity": "sha512-gfqQWyVPpT9NpLREXNR820AYwgz+Kr1GuF3nf1wxpHD6hdxI62tq03ToomFnDxY0m3pUB39IF7sil7D5TQexLA==", "requires": { "eslint-visitor-keys": "^1.1.0" } @@ -691,6 +731,16 @@ "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==" }, + "asl-validator": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/asl-validator/-/asl-validator-1.7.0.tgz", + "integrity": "sha512-63vmNSjb8HV5Ln43lBCEtN+1RoBX9ZMfeJrNTesNsLjfsan9H8Gdvy+Rjnk21QpvS9+j0uyefNqfWBL4qGt4Jw==", + "requires": { + "ajv": "^6.12.2", + "commander": "^5.1.0", + "jsonpath": "^1.0.2" + } + }, "asn1": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", @@ -725,12 +775,12 @@ "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" }, "autoprefixer": { - "version": "9.8.4", - "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.4.tgz", - "integrity": "sha512-84aYfXlpUe45lvmS+HoAWKCkirI/sw4JK0/bTeeqgHYco3dcsOn0NqdejISjptsYwNji/21dnkDri9PsYKk89A==", + "version": "9.8.5", + "resolved": "https://registry.npmjs.org/autoprefixer/-/autoprefixer-9.8.5.tgz", + "integrity": "sha512-C2p5KkumJlsTHoNv9w31NrBRgXhf6eCMteJuHZi2xhkgC+5Vm40MEtCKPhc0qdgAOhox0YPy1SQHTAky05UoKg==", "requires": { "browserslist": "^4.12.0", - "caniuse-lite": "^1.0.30001087", + "caniuse-lite": "^1.0.30001097", "colorette": "^1.2.0", "normalize-range": "^0.1.2", "num2fraction": "^1.2.2", @@ -748,6 +798,14 @@ "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" }, + "axios": { + "version": "0.19.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.2.tgz", + "integrity": "sha512-fjgm5MvRHLhx+osE2xoekY70AhARk3a6hkN+3Io1jc00jtquGvxYlKlsFUhmUET0V5te6CcZI7lcv2Ym61mjHA==", + "requires": { + "follow-redirects": "1.5.10" + } + }, "babel-eslint": { "version": "10.1.0", "resolved": "https://registry.npmjs.org/babel-eslint/-/babel-eslint-10.1.0.tgz", @@ -791,6 +849,39 @@ "json-to-ast": "^2.0.3", "jsonpointer": "^4.0.1", "leven": "^3.1.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + } } }, "blueimp-md5": { @@ -816,12 +907,12 @@ } }, "browserslist": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.12.1.tgz", - "integrity": "sha512-WMjXwFtPskSW1pQUDJRxvRKRkeCr7usN0O/Za76N+F4oadaTdQHotSGcX9jT/Hs7mSKPkyMFNvqawB/1HzYDKQ==", + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.13.0.tgz", + "integrity": "sha512-MINatJ5ZNrLnQ6blGvePd/QOz9Xtu+Ne+x29iQSCHfkU5BugKVJwZKn/iiL8UbpIpa3JhviKjz+XxMo0m2caFQ==", "requires": { - "caniuse-lite": "^1.0.30001088", - "electron-to-chromium": "^1.3.481", + "caniuse-lite": "^1.0.30001093", + "electron-to-chromium": "^1.3.488", "escalade": "^3.0.1", "node-releases": "^1.1.58" } @@ -852,9 +943,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001088", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001088.tgz", - "integrity": "sha512-6eYUrlShRYveyqKG58HcyOfPgh3zb2xqs7NvT2VVtP3hEUeeWvc3lqhpeMTxYWBBeeaT9A4bKsrtjATm66BTHg==" + "version": "1.0.30001104", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001104.tgz", + "integrity": "sha512-pkpCg7dmI/a7WcqM2yfdOiT4Xx5tzyoHAXWsX5/HxZ3TemwDZs0QXdqbE0UPLPVy/7BeK7693YfzfRYfu1YVpg==" }, "caseless": { "version": "0.12.0", @@ -867,35 +958,26 @@ "integrity": "sha512-MOli1W+nfbPLlKEhInaxhRdp7KVLFxLN5ykwzHgLsLI3H3gs5jjFAK4Eoj3OzzcxCtumDaI8onoVDeQyWaNTkw==" }, "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", + "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" }, "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "requires": { - "color-convert": "^1.9.0" - } + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", "requires": { - "color-name": "1.1.3" + "has-flag": "^4.0.0" } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" } } }, @@ -932,6 +1014,15 @@ "restore-cursor": "^3.1.0" } }, + "cli-progress": { + "version": "3.8.2", + "resolved": "https://registry.npmjs.org/cli-progress/-/cli-progress-3.8.2.tgz", + "integrity": "sha512-qRwBxLldMSfxB+YGFgNRaj5vyyHe1yMpVeDL79c+7puGujdKJHQHydgqXDcrkvQgJ5U/d3lpf6vffSoVVUftVQ==", + "requires": { + "colors": "^1.1.2", + "string-width": "^4.2.0" + } + }, "cli-width": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", @@ -994,9 +1085,9 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" }, "colorette": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.0.tgz", - "integrity": "sha512-soRSroY+OF/8OdA3PTQXwaDJeMc7TfknKKrxeSCencL2a4+Tx5zhxmmv7hdpCjhKBjehzp8+bwe/T68K0hpIjw==" + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz", + "integrity": "sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw==" }, "colors": { "version": "1.4.0", @@ -1012,12 +1103,9 @@ } }, "commander": { - "version": "2.9.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", - "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", - "requires": { - "graceful-readlink": ">= 1.0.0" - } + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", + "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==" }, "concat-map": { "version": "0.0.1", @@ -1144,6 +1232,11 @@ "resolved": "https://registry.npmjs.org/decimal.js/-/decimal.js-10.2.0.tgz", "integrity": "sha512-vDPw+rDgn3bZe1+F/pyEwb1oMG2XTlRVgAa6B4KccTEpYgF8w6eQllVbQcfIJnZyvzFtFpxnpGtx8dd7DJp/Rw==" }, + "decode-html": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/decode-html/-/decode-html-2.0.0.tgz", + "integrity": "sha1-fQqIfORCgOYJeKcH67f4CB/WHqo=" + }, "deep-extend": { "version": "0.5.1", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.5.1.tgz", @@ -1170,13 +1263,6 @@ "ast-types": "0.x.x", "escodegen": "1.x.x", "esprima": "3.x.x" - }, - "dependencies": { - "esprima": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", - "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" - } } }, "deglob": { @@ -1271,15 +1357,6 @@ "wrap-ansi": "^2.0.0" } }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, "get-caller-file": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", @@ -1293,55 +1370,6 @@ "number-is-nan": "^1.0.0" } }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", @@ -1365,14 +1393,6 @@ "ansi-regex": "^2.0.0" } }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", - "requires": { - "is-utf8": "^0.2.0" - } - }, "supports-color": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", @@ -1483,9 +1503,9 @@ } }, "electron-to-chromium": { - "version": "1.3.483", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.483.tgz", - "integrity": "sha512-+05RF8S9rk8S0G8eBCqBRBaRq7+UN3lDs2DAvnG8SBSgQO3hjy0+qt4CmRk5eiuGbTcaicgXfPmBi31a+BD3lg==" + "version": "1.3.502", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.502.tgz", + "integrity": "sha512-TIeXOaHAvfP7FemGUtAJxStmOc1YFGWFNqdey/4Nk41L9b1nMmDVDGNMIWhZJvOfJxix6Cv5FGEnBK+yvw3UTg==" }, "emoji-regex": { "version": "8.0.0", @@ -1560,9 +1580,9 @@ } }, "escalade": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.1.tgz", - "integrity": "sha512-DR6NO3h9niOT+MZs7bjxlj2a1k+POu5RN8CLTPX2+i78bRi9eLe7+0zXgUHMnGXWybYcL61E9hGhPKqedy8tQA==" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.0.2.tgz", + "integrity": "sha512-gPYAU37hYCUhW5euPeR+Y74F7BL+IBsV93j5cvGriSaD1aG6MGsqsV1yamRdrWrb2j3aiZvb0X+UBOWpx3JWtQ==" }, "escape-string-regexp": { "version": "1.0.5", @@ -1581,53 +1601,17 @@ "source-map": "~0.6.1" }, "dependencies": { - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "optional": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "~1.1.2" - } + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" } } }, "eslint": { - "version": "7.5.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.5.0.tgz", - "integrity": "sha512-vlUP10xse9sWt9SGRtcr1LAC67BENcQMFeV+w5EvLEoFe3xJ8cF1Skd0msziRx/VMC+72B4DxreCE+OR12OA6Q==", + "version": "7.6.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.6.0.tgz", + "integrity": "sha512-QlAManNtqr7sozWm5TF4wIH9gmUm2hE3vNRUvyoYAa4y1l5/jxD/PQStEjBMQtCqZmSep8UxrcecI60hOpe61w==", "requires": { "@babel/code-frame": "^7.0.0", "ajv": "^6.10.0", @@ -1667,15 +1651,6 @@ "v8-compile-cache": "^2.0.3" }, "dependencies": { - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, "globals": { "version": "12.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", @@ -1684,27 +1659,49 @@ "type-fest": "^0.8.1" } }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, "ignore": { "version": "4.0.6", "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, "lodash": { "version": "4.17.19", "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", "requires": { - "has-flag": "^4.0.0" + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "requires": { + "prelude-ls": "^1.2.1" } } } @@ -1829,17 +1826,108 @@ "isarray": "^1.0.0" } }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "requires": { + "locate-path": "^2.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "requires": { + "pify": "^2.0.0" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" } } }, "eslint-plugin-jest": { - "version": "23.18.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.18.0.tgz", - "integrity": "sha512-wLPM/Rm1SGhxrFQ2TKM/BYsYPhn7ch6ZEK92S2o/vGkAAnDXM0I4nTIo745RIX+VlCRMFgBuJEax6XfTHMdeKg==", + "version": "23.20.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.20.0.tgz", + "integrity": "sha512-+6BGQt85OREevBDWCvhqj1yYA4+BFK4XnRZSGJionuEYmcglMZYLNNBBemwzbqUAckURaHdJSBcjHPyrtypZOw==", "requires": { "@typescript-eslint/experimental-utils": "^2.5.0" }, @@ -1968,9 +2056,9 @@ } }, "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz", + "integrity": "sha1-/cpRzuYTOJXjyI1TXOSdv/YqRjM=" }, "esquery": { "version": "1.3.1", @@ -2044,16 +2132,15 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "fast-glob": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", - "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.1.0.tgz", + "integrity": "sha512-TrUz3THiq2Vy3bjfQUB2wNyPdGBeGmdjbzzBLhfHN4YFurYptCKwGq/TfiRavbGywFRzY6U2CdmQ1zmsY5yYaw==", "requires": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.0", "merge2": "^1.3.0", - "micromatch": "^4.0.2", - "picomatch": "^2.2.1" + "micromatch": "^4.0.2" } }, "fast-json-stable-stringify": { @@ -2108,6 +2195,27 @@ "to-regex-range": "^5.0.1" } }, + "find-java-home": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/find-java-home/-/find-java-home-1.1.0.tgz", + "integrity": "sha512-bSTCKNZ193UM/+ZZoNDzICAEHcVywovkhsWCkZALjCvRXQ+zXTe/XATrrP4CpxkaP6YFhQJOpyRpH0P2U/woDA==", + "requires": { + "which": "~1.0.5", + "winreg": "~1.2.2" + }, + "dependencies": { + "which": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/which/-/which-1.0.9.tgz", + "integrity": "sha1-RgwdoPgQED0DIam2M6+eV15kSG8=" + } + } + }, + "find-package-json": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/find-package-json/-/find-package-json-1.2.0.tgz", + "integrity": "sha512-+SOGcLGYDJHtyqHd87ysBhmaeQ95oWspDKnMXBrnQ9Eq4OkLNqejgoaD8xVWu6GPa0B6roa6KinCMEMcVeqONw==" + }, "find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", @@ -2137,6 +2245,29 @@ "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==" }, + "follow-redirects": { + "version": "1.5.10", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", + "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", + "requires": { + "debug": "=3.1.0" + }, + "dependencies": { + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + } + } + }, "forever-agent": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", @@ -2152,6 +2283,16 @@ "mime-types": "^2.1.12" } }, + "fs-extra": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", + "requires": { + "graceful-fs": "^4.2.0", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -2166,11 +2307,6 @@ "xregexp": "2.0.0" }, "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" - }, "readable-stream": { "version": "1.1.14", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", @@ -2181,11 +2317,6 @@ "isarray": "0.0.1", "string_decoder": "~0.10.x" } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" } } }, @@ -2239,28 +2370,6 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "requires": { - "safe-buffer": "~5.1.0" - } } } }, @@ -2369,6 +2478,21 @@ "ignore": "^5.1.4", "merge2": "^1.3.0", "slash": "^3.0.0" + }, + "dependencies": { + "fast-glob": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", + "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + } + } } }, "globjoin": { @@ -2481,32 +2605,10 @@ "xml": "1.0.1" }, "dependencies": { - "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==" - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } + "strip-json-comments": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", + "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==" } } }, @@ -2527,6 +2629,29 @@ "version": "1.1.2", "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" + }, + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" + }, + "string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "requires": { + "safe-buffer": "~5.2.0" + } } } }, @@ -2662,9 +2787,9 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inquirer": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.0.tgz", - "integrity": "sha512-K+LZp6L/6eE5swqIcVXrxl21aGDU4S50gKH0/d96OMQnSBCyGyZl/oZhbkVmdp5sBoINHd4xZvFSARh2dk6DWA==", + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.2.tgz", + "integrity": "sha512-DF4osh1FM6l0RJc5YWYhSDB6TawiBRlbV9Cox8MWlidU218Tb7fm3lQTULyUJDfJ0tjbzl0W4q651mrCCEM55w==", "requires": { "ansi-escapes": "^4.2.1", "chalk": "^4.1.0", @@ -2672,7 +2797,7 @@ "cli-width": "^3.0.0", "external-editor": "^3.0.3", "figures": "^3.0.0", - "lodash": "^4.17.15", + "lodash": "^4.17.16", "mute-stream": "0.0.8", "run-async": "^2.4.0", "rxjs": "^6.6.0", @@ -2695,6 +2820,11 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" }, + "lodash": { + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" + }, "supports-color": { "version": "7.1.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", @@ -2844,9 +2974,9 @@ "integrity": "sha512-5SMO8RVennx3nZrqtKwCGyyetPE9VDba5ugvKLaD4KopPG5kR4mQ7tNt/r7feL5yt5h3lpuBbIUmCOG2eSzXHA==" }, "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" }, "isexe": { "version": "2.0.0", @@ -2870,6 +3000,13 @@ "requires": { "argparse": "^1.0.7", "esprima": "^4.0.0" + }, + "dependencies": { + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + } } }, "jsbn": { @@ -2929,6 +3066,14 @@ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.1.tgz", "integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==" }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, "jsonlint": { "version": "1.6.3", "resolved": "https://registry.npmjs.org/jsonlint/-/jsonlint-1.6.3.tgz", @@ -2938,15 +3083,32 @@ "nomnom": "^1.5.x" } }, + "jsonpath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/jsonpath/-/jsonpath-1.0.2.tgz", + "integrity": "sha512-rmzlgFZiQPc6q4HDyK8s9Qb4oxBnI5sF61y/Co5PV0lc3q2bIuRsNdueVbhoSHdKM4fxeimphOAtfz47yjCfeA==", + "requires": { + "esprima": "1.2.2", + "static-eval": "2.0.2", + "underscore": "1.7.0" + }, + "dependencies": { + "esprima": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-1.2.2.tgz", + "integrity": "sha1-dqD9Zvz+FU/SkmZ9wmQBl1CxZXs=" + } + } + }, "jsonpath-plus": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonpath-plus/-/jsonpath-plus-4.0.0.tgz", "integrity": "sha512-e0Jtg4KAzDJKKwzbLaUtinCn0RZseWBVRTRGihSpvFlM3wTR7ExSp+PTdeTsDrLNJUe7L7JYJe8mblHX5SCT6A==" }, "jsonpointer": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.0.1.tgz", - "integrity": "sha1-T9kss04OnbPInIYi7PUfm5eMbLk=" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz", + "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==" }, "jsprim": { "version": "1.4.1", @@ -2992,12 +3154,12 @@ "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==" }, "levn": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", - "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", "requires": { - "prelude-ls": "^1.2.1", - "type-check": "~0.4.0" + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" } }, "lines-and-columns": { @@ -3014,14 +3176,15 @@ } }, "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", "requires": { "graceful-fs": "^4.1.2", "parse-json": "^2.2.0", "pify": "^2.0.0", - "strip-bom": "^3.0.0" + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" } }, "locate-path": { @@ -3053,30 +3216,6 @@ "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", "requires": { "chalk": "^4.0.0" - }, - "dependencies": { - "chalk": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", - "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - } } }, "longest-streak": { @@ -3159,6 +3298,19 @@ "rc": "~1.2.7" }, "dependencies": { + "commander": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.9.0.tgz", + "integrity": "sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=", + "requires": { + "graceful-readlink": ">= 1.0.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, "get-stdin": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-5.0.1.tgz", @@ -3392,9 +3544,9 @@ "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" }, "node-releases": { - "version": "1.1.58", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.58.tgz", - "integrity": "sha512-NxBudgVKiRh/2aPWMgPR7bPTX0VPmGx5QBwCtdHitnqFE5/O8DeBXuIMH1nwNnw/aMo6AjOrpsHzfY3UbUJ7yg==" + "version": "1.1.59", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.59.tgz", + "integrity": "sha512-H3JrdUczbdiwxN5FuJPyCHnGHIFqQ0wWxo+9j1kAXAzqNMAHlo+4I/sYYxpyK0irQ73HgdiyzD32oqQDcU2Osw==" }, "nomnom": { "version": "1.8.1", @@ -3424,6 +3576,11 @@ "version": "0.1.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-0.1.1.tgz", "integrity": "sha1-OeipjQRNFQZgq+SmgIrPcLt7yZE=" + }, + "underscore": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", + "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=" } } }, @@ -3455,6 +3612,36 @@ "resolved": "https://registry.npmjs.org/normalize-selector/-/normalize-selector-0.2.0.tgz", "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=" }, + "npm-groovy-lint": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/npm-groovy-lint/-/npm-groovy-lint-6.1.0.tgz", + "integrity": "sha512-IVU9mPARZflUWXkWq4wt+qBTJDeEAmhH+5Nl89mI3eIKiPlMEOriAq/iXXwsA5IT4CaS+848Ea5sd3yTQqEIOw==", + "requires": { + "@amplitude/node": "^0.3.3", + "ansi-colors": "^4.1.1", + "axios": "^0.19.2", + "cli-progress": "^3.6.0", + "debug": "^4.1.1", + "decode-html": "^2.0.0", + "find-java-home": "^1.1.0", + "find-package-json": "^1.2.0", + "fs-extra": "^8.1.0", + "glob": "^7.1.6", + "import-fresh": "^3.2.1", + "ip": "^1.1.5", + "optionator": "^0.8.3", + "semver": "^7.1.3", + "strip-json-comments": "^3.0.1", + "uuid": "^8.2.0" + }, + "dependencies": { + "uuid": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.0.tgz", + "integrity": "sha512-fX6Z5o4m6XsXBdli9g7DtWgAx+osMsRRZFKma1mIUsLCz6vRvv+pz5VNbyu9UEDzpMWulZfvpgb/cmDXVulYFQ==" + } + } + }, "num2fraction": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/num2fraction/-/num2fraction-1.2.2.tgz", @@ -3545,16 +3732,16 @@ } }, "optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", "requires": { - "deep-is": "^0.1.3", - "fast-levenshtein": "^2.0.6", - "levn": "^0.4.1", - "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" } }, "os-locale": { @@ -3694,11 +3881,13 @@ "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" }, "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", "requires": { - "pify": "^2.0.0" + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, "performance-now": { @@ -3794,6 +3983,11 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==" }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + }, "type-fest": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", @@ -3874,10 +4068,46 @@ "supports-color": "^6.1.0" }, "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "dependencies": { + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" }, "supports-color": { "version": "6.1.0", @@ -3921,6 +4151,37 @@ "postcss": "^7.0.7" }, "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, "log-symbols": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", @@ -3982,9 +4243,9 @@ "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==" }, "prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", - "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==" + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" }, "prettier": { "version": "2.0.5", @@ -4100,77 +4361,70 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", "requires": { - "load-json-file": "^2.0.0", + "load-json-file": "^1.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "path-type": "^1.0.0" } }, "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" }, "dependencies": { "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", "requires": { - "locate-path": "^2.0.0" + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" } }, - "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", - "requires": { - "p-locate": "^2.0.0", - "path-exists": "^3.0.0" - } - }, - "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", - "requires": { - "p-try": "^1.0.0" - } - }, - "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", - "requires": { - "p-limit": "^1.1.0" - } - }, - "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=" - }, "path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "requires": { + "pinkie-promise": "^2.0.0" + } } } }, "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + }, + "dependencies": { + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + } } }, "redent": { @@ -4193,9 +4447,9 @@ "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==" }, "remark": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/remark/-/remark-12.0.0.tgz", - "integrity": "sha512-oX4lMIS0csgk8AEbzY0h2jdR0ngiCHOpwwpxjmRa5TqAkeknY+tkhjRJGZqnCmvyuWh55/0SW5WY3R3nn3PH9A==", + "version": "12.0.1", + "resolved": "https://registry.npmjs.org/remark/-/remark-12.0.1.tgz", + "integrity": "sha512-gS7HDonkdIaHmmP/+shCPejCEEW+liMp/t/QwmF0Xt47Rpuhl32lLtDV1uKWvGoq+kxr5jSgg5oAIpGuyULjUw==", "requires": { "remark-parse": "^8.0.0", "remark-stringify": "^8.0.0", @@ -4203,9 +4457,9 @@ } }, "remark-parse": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.2.tgz", - "integrity": "sha512-eMI6kMRjsAGpMXXBAywJwiwAse+KNpmt+BK55Oofy4KvBZEqUDj6mWbGLJZrujoPIPPxDXzn3T9baRlpsm2jnQ==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-8.0.3.tgz", + "integrity": "sha512-E1K9+QLGgggHxCQtLt++uXltxEprmWzNfg+MxpfHsZlrddKzZ/hZyWHDbK3/Ap8HJQqYJRXP+jHczdL6q6i85Q==", "requires": { "ccount": "^1.0.0", "collapse-white-space": "^1.0.2", @@ -4226,9 +4480,9 @@ } }, "remark-stringify": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-8.1.0.tgz", - "integrity": "sha512-FSPZv1ds76oAZjurhhuV5qXSUSoz6QRPuwYK38S41sLHwg4oB7ejnmZshj7qwjgYLf93kdz6BOX9j5aidNE7rA==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/remark-stringify/-/remark-stringify-8.1.1.tgz", + "integrity": "sha512-q4EyPZT3PcA3Eq7vPpT6bIdokXzFGp9i85igjmhRyXWmPs0Y6/d2FYwUNotKAWyLch7g0ASZJn/KHHcHZQ163A==", "requires": { "ccount": "^1.0.0", "is-alphanumeric": "^1.0.0", @@ -4471,9 +4725,9 @@ } }, "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=" + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==" }, "spdx-correct": { "version": "3.1.1", @@ -4550,6 +4804,37 @@ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==" }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=" + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -4644,38 +4929,11 @@ "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==" }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, "path-key": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=" - }, "regexpp": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", @@ -4707,14 +4965,6 @@ "ansi-regex": "^4.1.0" } }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", - "requires": { - "prelude-ls": "~1.1.2" - } - }, "which": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", @@ -4748,6 +4998,14 @@ "resolved": "https://registry.npmjs.org/state-toggle/-/state-toggle-1.0.3.tgz", "integrity": "sha512-d/5Z4/2iiCnHw6Xzghyhb+GcmF89bxwgXG60wjIiZaxnymbyOmI8Hk4VqHXiVVp6u2ysaskFfXg3ekCj4WNftQ==" }, + "static-eval": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/static-eval/-/static-eval-2.0.2.tgz", + "integrity": "sha512-N/D219Hcr2bPjLxPiV+TQE++Tsmrady7TqAJugLy7Xk1EumfDWS/f5dtBbkRCGE7wKKXuYockQoj8Rm2/pVKyg==", + "requires": { + "escodegen": "^1.8.1" + } + }, "statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -4787,19 +5045,9 @@ } }, "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - }, - "dependencies": { - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - } - } + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" }, "stringify-entities": { "version": "3.0.1", @@ -4822,9 +5070,12 @@ } }, "strip-bom": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", - "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "requires": { + "is-utf8": "^0.2.0" + } }, "strip-indent": { "version": "3.0.0", @@ -4835,9 +5086,9 @@ } }, "strip-json-comments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", - "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==" + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==" }, "style-search": { "version": "0.1.0", @@ -5084,9 +5335,9 @@ "integrity": "sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==" }, "tslib": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", - "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==" + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.11.1.tgz", + "integrity": "sha512-aZW88SY8kQbU7gpV19lN24LtXh/yD4ZZg6qieAJDDg+YBsJcSmLGK9QpnUjAKVG/xefmvJGd1WUmfpT/g6AJGA==" }, "tsutils": { "version": "3.17.1", @@ -5110,11 +5361,11 @@ "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, "type-check": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", - "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", "requires": { - "prelude-ls": "^1.2.1" + "prelude-ls": "~1.1.2" } }, "type-fest": { @@ -5141,9 +5392,9 @@ "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" }, "underscore": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.6.0.tgz", - "integrity": "sha1-izixDKze9jM3uLJOT/htRa6lKag=" + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.7.0.tgz", + "integrity": "sha1-a7rwh3UA02vjTsqlhODbn+8DUgk=" }, "unherit": { "version": "1.1.3", @@ -5202,9 +5453,9 @@ } }, "unist-util-visit": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.2.tgz", - "integrity": "sha512-HoHNhGnKj6y+Sq+7ASo2zpVdfdRifhTgX2KTU3B/sO/TTlZchp7E3S4vjRzDJ7L60KmrCPsQkVK3lEF3cz36XQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-2.0.3.tgz", + "integrity": "sha512-iJ4/RczbJMkD0712mGktuGpm/U4By4FfDonL7N/9tATGIF4imikjOuagyMY53tnZq3NP6BcmlrHhEKAfGWjh7Q==", "requires": { "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0", @@ -5212,14 +5463,19 @@ } }, "unist-util-visit-parents": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.0.2.tgz", - "integrity": "sha512-yJEfuZtzFpQmg1OSCyS9M5NJRrln/9FbYosH3iW0MG402QbdbaB8ZESwUv9RO6nRfLAKvWcMxCwdLWOov36x/g==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-3.1.0.tgz", + "integrity": "sha512-0g4wbluTF93npyPrp/ymd3tCDTMnP0yo2akFD2FIBAYXq/Sga3lwaU1D8OYKbtpioaI6CkDcQ6fsMnmtzt7htw==", "requires": { "@types/unist": "^2.0.0", "unist-util-is": "^4.0.0" } }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -5316,6 +5572,11 @@ "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=" }, + "winreg": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/winreg/-/winreg-1.2.4.tgz", + "integrity": "sha1-ugZWKbepJRMOFXeRCM9UCZDpjRs=" + }, "wolfy87-eventemitter": { "version": "5.2.9", "resolved": "https://registry.npmjs.org/wolfy87-eventemitter/-/wolfy87-eventemitter-5.2.9.tgz", @@ -5391,9 +5652,9 @@ "integrity": "sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==" }, "yargs": { - "version": "15.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz", - "integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==", + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "requires": { "cliui": "^6.0.0", "decamelize": "^1.2.0", @@ -5405,7 +5666,7 @@ "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^18.1.1" + "yargs-parser": "^18.1.2" } }, "yargs-parser": { diff --git a/dependencies/package.json b/dependencies/package.json index 19ce0341..ffa549c9 100644 --- a/dependencies/package.json +++ b/dependencies/package.json @@ -3,14 +3,13 @@ "dependencies": { "@coffeelint/cli": "^3.2.10", "@stoplight/spectral": "^5.4.0", - "@typescript-eslint/eslint-plugin": "^3.7.0", - "@typescript-eslint/parser": "^3.7.0", - "@typescript-eslint/eslint-plugin": "^3.7.0", + "@typescript-eslint/eslint-plugin": "^3.8.0", + "@typescript-eslint/parser": "^3.8.0", "babel-eslint": "^10.1.0", "dockerfilelint": "^1.5.0", - "eslint": "^7.5.0", + "eslint": "^7.6.0", "eslint-config-prettier": "^6.11.0", - "eslint-plugin-jest": "^23.18.0", + "eslint-plugin-jest": "^23.20.0", "htmlhint": "^0.14.1", "jsonlint": "^1.6.3", "markdownlint-cli": "^0.23.2", @@ -19,6 +18,9 @@ "standard": "^14.3.4", "stylelint": "^13.6.1", "stylelint-config-standard": "^20.0.0", - "typescript": "^3.9.7" + "npm-groovy-lint": "^6.1.0", + "typescript": "^3.9.7", + "asl-validator": "^1.7.0" + } } diff --git a/dependencies/phive.xml b/dependencies/phive.xml new file mode 100644 index 00000000..8d1b31d4 --- /dev/null +++ b/dependencies/phive.xml @@ -0,0 +1,7 @@ + + + + + + + diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 858966a0..15ddb185 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -14,36 +14,862 @@ For some linters it is also possible to override rules on a case by case level w ## Table of Linters -- [Ruby](#ruby) -- [Shell](#shell) -- [Ansible](#ansible) -- [YAML](#yaml) -- [AWS CloudFormation templates](#cfn) -- [Python](#python3) -- [JSON](#json) -- [Markdown](#markdown) -- [Perl](#perl) -- [Raku](#raku) -- [PHP](#php) -- [XML](#xml) -- [Coffeescript](#coffeescript) -- [Javascript Eslint](#javascript-eslint) -- [Javascript Standard](#javascript-standard) -- [Typescript Eslint](#typescript-eslint) -- [Typescript Standard](#typescript-standard) -- [Golang](#golang) -- [Dockerfile](#dockerfile) -- [Terraform](#terraform) -- [CSS](#css) -- [ENV](#dotenv-linter) -- [Kotlin](#kotlin) -- [OpenAPI](#openapi) -- [Protocol Buffers](#protocol-buffers) -- [EDITORCONFIG-CHECKER](#editorconfig-checker) -- [HTML](#html) +- [Disabling linters and Rules](#disabling-linters-and-rules) + - [Table of Linters](#table-of-linters) + - [Ansible](#ansible) + - [AWS CloudFormation templates](#aws-cloudformation-templates) + - [Clojure](#clojure) + - [Coffeescript](#coffeescript) + - [CSS](#css) + - [Dart](#dart) + - [Dockerfile](#dockerfile) + - [EDITORCONFIG-CHECKER](#editorconfig-checker) + - [ENV](#env) + - [Golang](#golang) + - [Groovy](#groovy) + - [HTML](#html) + - [Javascript eslint](#javascript-eslint) + - [Javascript standard](#javascript-standard) + - [JSON](#json) + - [Kotlin](#kotlin) + - [Lua](#lua) + - [Markdown](#markdown) + - [OpenAPI](#openapi) + - [Perl](#perl) + - [PHP](#php) + - [Protocol Buffers](#protocol-buffers) + - [Python3 pylint](#python3-pylint) + - [Python3 flake8](#python3-flake8) + - [Raku](#raku) + - [Ruby](#ruby) + - [Shell](#shell) + - [Terraform](#terraform) + - [Typescript eslint](#typescript-eslint) + - [Typescript standard](#typescript-standard) + - [XML](#xml) + - [YAML](#yaml) +--- + +## Ansible + +- [ansible-lint](https://github.com/ansible/ansible-lint) + +### Ansible-lint Config file + +- `.github/linters/.ansible-lint.yml` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.ansible-lint.yml` + +### Ansible-lint disable single line + +```yml +- name: this would typically fire GitHasVersionRule 401 and BecomeUserWithoutBecomeRule 501 + become_user: alice # noqa 401 501 + git: src=/path/to/git/repo dest=checkout +``` + +### Ansible-lint disable code block + +```yml +- name: this would typically fire GitHasVersionRule 401 + git: src=/path/to/git/repo dest=checkout + tags: + - skip_ansible_lint +``` + +### Ansible-lint disable entire file + +```yml +- name: this would typically fire GitHasVersionRule 401 + git: src=/path/to/git/repo dest=checkout + tags: + - skip_ansible_lint +``` + +--- + +## AWS CloudFormation templates + +- [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint/) + +### cfn-lint Config file + +- `.github/linters/.cfnlintrc.yml` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.cfnlintrc.yml` + +### cfn-lint disable single line + +- There is currently **No** way to disable rules inline of the file(s) + +### cfn-lint disable code block + +You can disable both [template](https://github.com/aws-cloudformation/cfn-python-lint/#template-based-metadata) or [resource](https://github.com/aws-cloudformation/cfn-python-lint/#resource-based-metadata) via [metadata](https://github.com/aws-cloudformation/cfn-python-lint/#metadata): + +```yaml +Resources: + myInstance: + Type: AWS::EC2::Instance + Metadata: + cfn-lint: + config: + ignore_checks: + - E3030 + Properties: + InstanceType: nt.x4superlarge + ImageId: ami-abc1234 +``` + +### cfn-lint disable entire file + +If you need to ignore an entire file, you can update the `.github/linters/.cfnlintrc.yml` to ignore certain files and locations + +```yaml +ignore_templates: + - codebuild.yaml +``` + +--- + +## Clojure + +- [clj-kondo](https://github.com/borkdude/clj-kondo) +- Since clj-kondo approaches static analysis in a very Clojure way, it is advised to read the [configuration docs](https://github.com/borkdude/clj-kondo/blob/master/doc/config.md) + +### clj-kondo standard Config file + +- `.github/linters/.clj-kondo/config.edn` + +### clj-kondo disable single line + +- There is currently **No** way to disable rules in a single line + +### clj-kondo disable code block + +- There is currently **No** way to disable rules in a code block + +### clj-kondo disable entire file + +```clojure +{:output {:exclude-files ["path/to/file"]}} +``` + +--- + +## Coffeescript + +- [coffeelint](https://coffeelint.github.io/) + +### coffeelint Config file + +- `.github/linters/.coffee-lint.yml` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.coffee.yml` + +### coffeelint disable single line + +```Coffeescript +# coffeelint: disable=max_line_length +foo = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" +# coffeelint: enable=max_line_length +``` + +### coffeelint disable code block + +```Coffeescript +# coffeelint: disable +foo = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" +bar = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" +baz = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" +taz = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" +# coffeelint: enable +``` + +### coffeelint disable entire file + +- You can encapsulate the entire file with the _code block format_ to disable an entire file from being parsed + +--- + +## CSS + +- [stylelint](https://stylelint.io/) + +### stylelint standard Config file + +- `.github/linters/.stylelintrc.json` + +### stylelint disable single line + +```css +#id { + /* stylelint-disable-next-line declaration-no-important */ + color: pink !important; +} +``` + +### stylelint disable code block + +```css +/* stylelint-disable */ +a { +} +/* stylelint-enable */ +``` + +### stylelint disable entire file + +- You can disable entire files with the `ignoreFiles` property in `.stylelintrc.json` + +```json +{ + "ignoreFiles": [ + "styles/ignored/wildcards/*.css", + "styles/ignored/specific-file.css" + ] +} +``` + +--- + +## Dart + +- [dartanalyzer](https://dart.dev/tools/dartanalyzer) + +### dartanalyzer standard Config file + +- `.github/linters/.dart-lint.yml` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/analysis_options.yaml` + +### dartanalyzer disable single line + +```dart +int x = ''; // ignore: invalid_assignment +``` + +### dartanalyzer disable code block + +- You can make [rule exceptions](https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis) for the entire file. + +```dart +// ignore_for_file: unused_import, unused_local_variable +``` + +### dartanalyzer disable entire file + +- You can disable entire files with the `analyzer.exclude` property in `analysis_options.yaml` + +```dart +analyzer: + exclude: + - file +``` + +--- + +## Dockerfile + +- [dockerfilelint](https://github.com/replicatedhq/dockerfilelint.git) + +### Dockerfilelint standard Config file + +- `.github/linters/.dockerfilelintrc` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.dockerfilelintrc` + +### Dockerfilelint disable single line + +- There is currently **No** way to disable rules inline of the file(s) + +### Dockerfilelint disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### Dockerfilelint disable entire file + +- There is currently **No** way to disable rules inline of the file(s) + +--- + +## EDITORCONFIG-CHECKER +- [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) + +### editorconfig-checker Config file +- `.github/linters/.ecrc` +- This linter will also use the [`.editorconfig`](https://editorconfig.org/) of your project + +### editorconfig-checker disable single line + +```js + // editorconfig-checker-disable-line +``` + +### editorconfig-checker disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### editorconfig-checker disable entire file + +```js +// editorconfig-checker-disable-file +``` + +- You can disable entire files with the `Exclude` property in `.ecrc` + +```json +{ + "Exclude": ["path/to/file", "^regular\\/expression\\.ext$"] +} +``` + +--- + +## ENV + +- [dotenv-linter](https://github.com/dotenv-linter/dotenv-linter) + +### dotenv-linter Config file + +- There is no top level _configuration file_ available at this time + +### dotenv-linter disable single line + +```env +# Comment line will be ignored +``` + +### dotenv-linter disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### dotenv-linter disable entire file + +- There is currently **No** way to disable rules inline of the file(s) + +--- + +## Golang + +- [golangci-lint](https://github.com/golangci/golangci-lint) + +### golangci-lint standard Config file + +- `.github/linters/.golangci.yml` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.golangci.yml` + +### golangci-lint disable single line + +- There is currently **No** way to disable rules inline of the file(s) + +### golangci-lint disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### golangci-lint disable entire file + +- There is currently **No** way to disable rules inline of the file(s) + +--- + +## Groovy +- [npm-groovy-lint](https://github.com/nvuillam/npm-groovy-lint) + +### groovy-lint standard Config file +- `.github/linters/.groovylintrc.json` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.groovylintrc.json` + +### groovy-lint disable single line +```groovy +def variable = 1; // groovylint-disable-line + +// groovylint-disable-next-line +def variable = 1; + +/* groovylint-disable-next-line */ +def variable = 1; + +def variable = 1; /* groovylint-disable-line */ +``` + +### groovy-lint disable code block +```groovy +/* groovylint-disable */ + +def variable = 1; + +/* groovylint-enable */ +``` + +### groovy-lint disable entire file +- At the top line of the file add the line: +```groovy +/* groovylint-disable */ +``` + +--- + +## HTML + +- [htmlhint](https://htmlhint.com/) + +### htmlhint standard Config file + +- `.github/linters/.htmlhintrc` + +### htmlhint disable single line + +- There is currently **No** way to disable rules in a single line + +### htmlhint disable code block + +- There is currently **No** way to disable rules in a code block + +### htmlhint disable entire file + +- There is currently **No** way to disable rules in an entire file + +--- + +## Javascript eslint + +- [eslint](https://eslint.org/) + +### Javascript eslint Config file + +- `.github/linters/.eslintrc.yml` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.eslintrc.yml` + +### Javascript eslint disable single line + +```javascript +var thing = new Thing(); // eslint-disable-line no-use-before-define +thing.sayHello(); + +function Thing() { + this.sayHello = function () { + console.log("hello"); + }; +} +``` + +### Javascript eslint disable code block + +```javascript +/*eslint-disable */ + +//suppress all warnings between comments +alert("foo"); + +/*eslint-enable */ +``` + +### Javascript eslint disable entire file + +- Place at the top of the file: + +```javascript +/* eslint-disable */ +``` + +--- + +## Javascript standard + +- [standard js](https://standardjs.com/) + +### Javascript standard Config file + +- There is no top level _configuration file_ available at this time + +### Javascript standard disable single line + +- There is currently **No** way to disable rules inline of the file(s) + +### Javascript standard disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### Javascript standard disable entire file + +- There is currently **No** way to disable rules inline of the file(s) + +--- + +## JSON + +- [jsonlint](https://github.com/zaach/jsonlint) + +### JsonLint Config file + +- There is no top level _configuration file_ available at this time + +### JsonLint disable single line + +- There is currently **No** way to disable rules inline of the file(s) + +### JsonLint disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### JsonLint disable entire file + +- There is currently **No** way to disable rules inline of the file(s) + +--- + +## Kotlin + +- [ktlint](https://github.com/pinterest/ktlint) + +### ktlint Config file + +- There is no top level _configuration file_ available at this time + +### ktlint disable single line + +```kotlin +import package.* // ktlint-disable no-wildcard-imports +``` + +### ktlint disable code block + +```kotlin +/* ktlint-disable no-wildcard-imports */ +import package.a.* +import package.b.* +/* ktlint-enable no-wildcard-imports */ +``` + +### ktlint disable entire file + +- There is currently **No** way to disable rules inline of the file(s) + +--- + +## Lua + +- [luarocks](https://github.com/luarocks/luacheck) + +### luacheck standard Config file +- `.github/linters/.luacheckrc` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.luacheckrc` +- See [luacheck](https://luacheck.readthedocs.io/en/stable/config.html) docs for additional + behaviors + +### luacheck disable single line +```lua +-- luacheck: globals g1 g2, ignore foo +local foo = g1(g2) -- No warnings emitted. +``` + +### luacheck disable code block +```lua +-- The following unused function is not reported. +local function f() -- luacheck: ignore + -- luacheck: globals g3 + g3() -- No warning. +end +``` + +### luacheck include/exclude files (via .luacheckrc) +```lua +include_files = {"src", "spec/*.lua", "scripts/*.lua", "*.rockspec", "*.luacheckrc"} +exclude_files = {"src/luacheck/vendor"} +``` + +### luacheck push/pop +```lua +-- luacheck: push ignore foo +foo() -- No warning. +-- luacheck: pop +foo() -- Warning is emitted. +``` + +--- + +## Markdown + +- [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli#readme) +- [markdownlint rule documentation](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md) +- [markdownlint inline comment syntax](https://github.com/DavidAnson/markdownlint#configuration) + +### markdownlint Config file + +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.markdown-lint.yml` + +### markdownlint disable single line + +```markdown +## Here is some document + +Here is some random data + + + +any violation you want + + + +Here is more data + +``` + +### markdownlint disable code block + +```markdown +## Here is some document + +Here is some random data + + + +any violations you want + + + +Here is more data +``` + +### markdownlint disable entire file + +- You can encapsulate the entire file with the _code block format_ to disable an entire file from being parsed + +--- + +## OpenAPI + +- [spectral](https://github.com/stoplightio/spectral) + +### OpenAPI Config file + +- `.github/linters/.openapirc.yml` +- You can add, extend, and disable rules +- Documentation at [Spectral Custom Rulesets](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/guides/4-custom-rulesets.md) +- File should be located at: `.github/linters/.openapirc.yml` + +### OpenAPI disable single line + +- There is currently **No** way to disable rules inline of the file(s) + +### OpenAPI disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### OpenAPI disable entire file + +- There is currently **No** way to disable rules inline of the file(s) +- However, you can make [rule exceptions](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/guides/6-exceptions.md?srn=gh/stoplightio/spectral/docs/guides/6-exceptions.md) in the config for individual file(s). + +--- + +## Perl + +- [perl](https://pkgs.alpinelinux.org/package/edge/main/x86/perl) + +### Perl Config file + +- There is no top level _configuration file_ available at this time + +### Perl disable single line + +- There is currently **No** way to disable rules inline of the file(s) + +### Perl disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### Perl disable entire file + +- There is currently **No** way to disable rules inline of the file(s) + +--- + +## PHP + +- [PHP](https://www.php.net/) + +### PHP Config file + +- There is no top level _configuration file_ available at this time + +### PHP disable single line + +- There is currently **No** way to disable rules inline of the file(s) + +### PHP disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### PHP disable entire file + +- There is currently **No** way to disable rules inline of the file(s) + +--- + +## Protocol Buffers + +- [protolint](https://github.com/yoheimuta/protolint) + +### protolint Config file + +- `.github/linters/.protolintrc.yml` +- You can add, extend, and disable rules +- Documentation at [Rules](https://github.com/yoheimuta/protolint#rules) and [Configuring](https://github.com/yoheimuta/protolint#configuring) + +### protolint disable single line + +```protobuf +enum Foo { + // protolint:disable:next ENUM_FIELD_NAMES_UPPER_SNAKE_CASE + firstValue = 0; + second_value = 1; // protolint:disable:this ENUM_FIELD_NAMES_UPPER_SNAKE_CASE + THIRD_VALUE = 2; +} +``` + +### protolint disable code block + +```protobuf +// protolint:disable ENUM_FIELD_NAMES_UPPER_SNAKE_CASE +enum Foo { + firstValue = 0; + second_value = 1; + THIRD_VALUE = 2; +} +// protolint:enable ENUM_FIELD_NAMES_UPPER_SNAKE_CASE +``` + +### protolint disable entire file + +- You can disable entire files with the `lint.files.exclude` property in `.protolintrc.yml` + +```yaml +# Lint directives. +lint: + # Linter files to walk. + files: + # The specific files to exclude. + exclude: + - path/to/file +``` + +--- + +## Python3 pylint + +- [pylint](https://www.pylint.org/) + +### Pylint Config file + +- `.github/linters/.python-lint` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.python-lint` + +### Pylint disable single line + +```python +global VAR # pylint: disable=global-statement +``` + +### Pylint disable code block + +```python +"""pylint option block-disable""" + +__revision__ = None + +class Foo(object): + """block-disable test""" + + def __init__(self): + pass + + def meth1(self, arg): + """this issues a message""" + print(self) + + def meth2(self, arg): + """and this one not""" + # pylint: disable=unused-argument + print(self\ + + "foo") + + def meth3(self): + """test one line disabling""" + # no error + print(self.baz) # pylint: disable=no-member + # error + print(self.baz) +``` + +### Pylint disable entire file + +```python +#!/bin/python3 +# pylint: skip-file + +var = "terrible code down here..." +``` + +--- + +## Python3 flake8 + +- [flake8](https://flake8.pycqa.org/en/latest/) + +### flake8 Config file + +- `.github/linters/.flake8` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.flake8` + +### flake8 disable single line + +```python +example = lambda: 'example' # noqa: E731 +``` + +### flake8 disable entire file + +```python +#!/bin/python3 +# flake8: noqa + +var = "terrible code down here..." +``` + +--- + +## Raku + +- [raku](https://raku.org) + +### Raku Config file + +- There is no top level _configuration file_ available at this time + +### Raku disable single line + +- There is currently **No** way to disable rules inline of the file(s) + +### Raku disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### Raku disable entire file + +- There is currently **No** way to disable rules inline of the file(s) + + --- ## Ruby @@ -137,452 +963,25 @@ moreThings() --- -## Ansible +## Terraform -- [ansible-lint](https://github.com/ansible/ansible-lint) +- [tflint](https://github.com/terraform-linters/tflint) -### Ansible-lint Config file +### tflint standard Config file -- `.github/linters/.ansible-lint.yml` +- `.github/linters/.tflint.hcl` - You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.ansible-lint.yml` +- File should be located at: `.github/linters/.tflint.hcl` -### Ansible-lint disable single line - -```yml -- name: this would typically fire GitHasVersionRule 401 and BecomeUserWithoutBecomeRule 501 - become_user: alice # noqa 401 501 - git: src=/path/to/git/repo dest=checkout -``` - -### Ansible-lint disable code block - -```yml -- name: this would typically fire GitHasVersionRule 401 - git: src=/path/to/git/repo dest=checkout - tags: - - skip_ansible_lint -``` - -### Ansible-lint disable entire file - -```yml -- name: this would typically fire GitHasVersionRule 401 - git: src=/path/to/git/repo dest=checkout - tags: - - skip_ansible_lint -``` - ---- - -## YAML - -- [YamlLint](https://github.com/adrienverge/yamllint) - -### Yamllint Config file - -- `.github/linters/.yaml-lint.yml` -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.yaml-lint.yml` - -### Yamllint disable single line - -```yml -This line is waaaaaaaaaay too long # yamllint disable-line -``` - -### Yamllint disable code block - -```yml -# yamllint disable rule:colons -- Key: value - dolor: sit, - foo: bar -# yamllint enable -``` - -### Yamllint disable entire file - -If you need to ignore an entire file, you can update the `.github/linters/.yaml-lint.yml` to ignore certain files and locations - -```yml -# For all rules -ignore: | - *.dont-lint-me.yaml - /bin/ - !/bin/*.lint-me-anyway.yaml - -rules: - key-duplicates: - ignore: | - generated - *.template.yaml - trailing-spaces: - ignore: | - *.ignore-trailing-spaces.yaml - /ascii-art/* -``` - ---- - -## Python3 - -- [pylint](https://www.pylint.org/) - -### Pylint Config file - -- `.github/linters/.python-lint` -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.python-lint` - -### Pylint disable single line - -```python -global VAR # pylint: disable=global-statement -``` - -### Pylint disable code block - -```python -"""pylint option block-disable""" - -__revision__ = None - -class Foo(object): - """block-disable test""" - - def __init__(self): - pass - - def meth1(self, arg): - """this issues a message""" - print(self) - - def meth2(self, arg): - """and this one not""" - # pylint: disable=unused-argument - print(self\ - + "foo") - - def meth3(self): - """test one line disabling""" - # no error - print(self.baz) # pylint: disable=no-member - # error - print(self.baz) -``` - -### Pylint disable entire file - -```python -#!/bin/python3 -# pylint: skip-file - -var = "terrible code down here..." -``` - ---- - -## AWS CloudFormation templates - -- [cfn-lint](https://github.com/aws-cloudformation/cfn-python-lint/) - -### cfn-lint Config file - -- `.github/linters/.cfnlintrc.yml` -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.cfnlintrc.yml` - -### cfn-lint disable single line +### tflint disable single line - There is currently **No** way to disable rules inline of the file(s) -### cfn-lint disable code block - -You can disable both [template](https://github.com/aws-cloudformation/cfn-python-lint/#template-based-metadata) or [resource](https://github.com/aws-cloudformation/cfn-python-lint/#resource-based-metadata) via [metadata](https://github.com/aws-cloudformation/cfn-python-lint/#metadata): - -```yaml -Resources: - myInstance: - Type: AWS::EC2::Instance - Metadata: - cfn-lint: - config: - ignore_checks: - - E3030 - Properties: - InstanceType: nt.x4superlarge - ImageId: ami-abc1234 -``` - -### cfn-lint disable entire file - -If you need to ignore an entire file, you can update the `.github/linters/.cfnlintrc.yml` to ignore certain files and locations - -```yaml -ignore_templates: - - codebuild.yaml -``` - ---- - -## JSON - -- [jsonlint](https://github.com/zaach/jsonlint) - -### JsonLint Config file - -- There is no top level _configuration file_ available at this time - -### JsonLint disable single line +### tflint disable code block - There is currently **No** way to disable rules inline of the file(s) -### JsonLint disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### JsonLint disable entire file - -- There is currently **No** way to disable rules inline of the file(s) - ---- - -## Markdown - -- [markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli#readme) -- [markdownlint rule documentation](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md) -- [markdownlint inline comment syntax](https://github.com/DavidAnson/markdownlint#configuration) - -### markdownlint Config file - -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.markdown-lint.yml` - -### markdownlint disable single line - -```markdown -## Here is some document - -Here is some random data - - - -any violation you want - - - -Here is more data -``` - -### markdownlint disable code block - -```markdown -## Here is some document - -Here is some random data - - - -any violations you want - - - -Here is more data -``` - -### markdownlint disable entire file - -- You can encapsulate the entire file with the _code block format_ to disable an entire file from being parsed - ---- - -## Perl - -- [perl](https://pkgs.alpinelinux.org/package/edge/main/x86/perl) - -### Perl Config file - -- There is no top level _configuration file_ available at this time - -### Perl disable single line - -- There is currently **No** way to disable rules inline of the file(s) - -### Perl disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### Perl disable entire file - -- There is currently **No** way to disable rules inline of the file(s) - ---- - -## Raku - -- [raku](https://raku.org) - -### Raku Config file - -- There is no top level _configuration file_ available at this time - -### Raku disable single line - -- There is currently **No** way to disable rules inline of the file(s) - -### Raku disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### Raku disable entire file - -- There is currently **No** way to disable rules inline of the file(s) - ---- - ---- - -## PHP - -- [PHP](https://www.php.net/) - -### PHP Config file - -- There is no top level _configuration file_ available at this time - -### PHP disable single line - -- There is currently **No** way to disable rules inline of the file(s) - -### PHP disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### PHP disable entire file - -- There is currently **No** way to disable rules inline of the file(s) - ---- - -## XML - -- [XML](http://xmlsoft.org/) - -### LibXML Config file - -- There is no top level _configuration file_ available at this time - -### LibXML disable single line - -- There is currently **No** way to disable rules inline of the file(s) - -### LibXML disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### LibXML disable entire file - -- There is currently **No** way to disable rules inline of the file(s) - ---- - -## Coffeescript - -- [coffeelint](https://coffeelint.github.io/) - -### coffeelint Config file - -- `.github/linters/.coffee-lint.yml` -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.coffee.yml` - -### coffeelint disable single line - -```Coffeescript -# coffeelint: disable=max_line_length -foo = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" -# coffeelint: enable=max_line_length -``` - -### coffeelint disable code block - -```Coffeescript -# coffeelint: disable -foo = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" -bar = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" -baz = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" -taz = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/width" -# coffeelint: enable -``` - -### coffeelint disable entire file - -- You can encapsulate the entire file with the _code block format_ to disable an entire file from being parsed - ---- - -## Javascript eslint - -- [eslint](https://eslint.org/) - -### Javascript eslint Config file - -- `.github/linters/.eslintrc.yml` -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.eslintrc.yml` - -### Javascript eslint disable single line - -```javascript -var thing = new Thing(); // eslint-disable-line no-use-before-define -thing.sayHello(); - -function Thing() { - this.sayHello = function () { - console.log("hello"); - }; -} -``` - -### Javascript eslint disable code block - -```javascript -/*eslint-disable */ - -//suppress all warnings between comments -alert("foo"); - -/*eslint-enable */ -``` - -### Javascript eslint disable entire file - -- Place at the top of the file: - -```javascript -/* eslint-disable */ -``` - ---- - -## Javascript standard - -- [standard js](https://standardjs.com/) - -### Javascript standard Config file - -- There is no top level _configuration file_ available at this time - -### Javascript standard disable single line - -- There is currently **No** way to disable rules inline of the file(s) - -### Javascript standard disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### Javascript standard disable entire file +### tflint disable entire file - There is currently **No** way to disable rules inline of the file(s) @@ -652,355 +1051,72 @@ alert("foo"); --- -## Golang +## XML -- [golangci-lint](https://github.com/golangci/golangci-lint) +- [XML](http://xmlsoft.org/) -### golangci-lint standard Config file - -- `.github/linters/.golangci.yml` -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.golangci.yml` - -### golangci-lint disable single line - -- There is currently **No** way to disable rules inline of the file(s) - -### golangci-lint disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### golangci-lint disable entire file - -- There is currently **No** way to disable rules inline of the file(s) - ---- - -## Dockerfile - -- [dockerfilelint](https://github.com/replicatedhq/dockerfilelint.git) - -### Dockerfilelint standard Config file - -- `.github/linters/.dockerfilelintrc` -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.dockerfilelintrc` - -### Dockerfilelint disable single line - -- There is currently **No** way to disable rules inline of the file(s) - -### Dockerfilelint disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### Dockerfilelint disable entire file - -- There is currently **No** way to disable rules inline of the file(s) - ---- - -## Terraform - -- [tflint](https://github.com/terraform-linters/tflint) - -### tflint standard Config file - -- `.github/linters/.tflint.hcl` -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.tflint.hcl` - -### tflint disable single line - -- There is currently **No** way to disable rules inline of the file(s) - -### tflint disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### tflint disable entire file - -- There is currently **No** way to disable rules inline of the file(s) - ---- - -## CSS - -- [stylelint](https://stylelint.io/) - -### stylelint standard Config file - -- `.github/linters/.stylelintrc.json` - -### stylelint disable single line - -```css -#id { - /* stylelint-disable-next-line declaration-no-important */ - color: pink !important; -} -``` - -### stylelint disable code block - -```css -/* stylelint-disable */ -a { -} -/* stylelint-enable */ -``` - -### stylelint disable entire file - -- You can disable entire files with the `ignoreFiles` property in `.stylelintrc.json` - -```json -{ - "ignoreFiles": [ - "styles/ignored/wildcards/*.css", - "styles/ignored/specific-file.css" - ] -} -``` - ---- - -## ENV - -- [dotenv-linter](https://github.com/dotenv-linter/dotenv-linter) - -### dotenv-linter Config file +### LibXML Config file - There is no top level _configuration file_ available at this time -### dotenv-linter disable single line - -```env -# Comment line will be ignored -``` - -### dotenv-linter disable code block +### LibXML disable single line - There is currently **No** way to disable rules inline of the file(s) -### dotenv-linter disable entire file +### LibXML disable code block + +- There is currently **No** way to disable rules inline of the file(s) + +### LibXML disable entire file - There is currently **No** way to disable rules inline of the file(s) --- -## Kotlin +## YAML -- [ktlint](https://github.com/pinterest/ktlint) +- [YamlLint](https://github.com/adrienverge/yamllint) -### ktlint Config file +### Yamllint Config file -- There is no top level _configuration file_ available at this time - -### ktlint disable single line - -```kotlin -import package.* // ktlint-disable no-wildcard-imports -``` - -### ktlint disable code block - -```kotlin -/* ktlint-disable no-wildcard-imports */ -import package.a.* -import package.b.* -/* ktlint-enable no-wildcard-imports */ -``` - -### ktlint disable entire file - -- There is currently **No** way to disable rules inline of the file(s) - ---- - -## Dart - -- [dartanalyzer](https://dart.dev/tools/dartanalyzer) - -### dartanalyzer standard Config file - -- `.github/linters/.dart-lint.yml` +- `.github/linters/.yaml-lint.yml` - You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.dart-lint.yml` +- File should be located at: `.github/linters/.yaml-lint.yml` -### dartanalyzer disable single line +### Yamllint disable single line -```dart -int x = ''; // ignore: invalid_assignment +```yml +This line is waaaaaaaaaay too long # yamllint disable-line ``` -### dartanalyzer disable code block +### Yamllint disable code block -- You can make [rule exceptions](https://dart.dev/guides/language/analysis-options#excluding-code-from-analysis) for the entire file. - -```dart -// ignore_for_file: unused_import, unused_local_variable +```yml +# yamllint disable rule:colons +- Key: value + dolor: sit, + foo: bar +# yamllint enable ``` -### dartanalyzer disable entire file +### Yamllint disable entire file -- You can disable entire files with the `analyzer.exclude` property in `.dart-lint.yml` +If you need to ignore an entire file, you can update the `.github/linters/.yaml-lint.yml` to ignore certain files and locations -```dart -analyzer: - exclude: - - file +```yml +# For all rules +ignore: | + *.dont-lint-me.yaml + /bin/ + !/bin/*.lint-me-anyway.yaml + +rules: + key-duplicates: + ignore: | + generated + *.template.yaml + trailing-spaces: + ignore: | + *.ignore-trailing-spaces.yaml + /ascii-art/* ``` - ---- - -## OpenAPI - -- [spectral](https://github.com/stoplightio/spectral) - -### OpenAPI Config file - -- `.github/linters/.openapirc.yml` -- You can add, extend, and disable rules -- Documentation at [Spectral Custom Rulesets](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/guides/4-custom-rulesets.md) -- File should be located at: `.github/linters/.openapirc.yml` - -### OpenAPI disable single line - -- There is currently **No** way to disable rules inline of the file(s) - -### OpenAPI disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### OpenAPI disable entire file - -- There is currently **No** way to disable rules inline of the file(s) -- However, you can make [rule exceptions](https://stoplight.io/p/docs/gh/stoplightio/spectral/docs/guides/6-exceptions.md?srn=gh/stoplightio/spectral/docs/guides/6-exceptions.md) in the config for individual file(s). - ---- - -## Protocol Buffers - -- [protolint](https://github.com/yoheimuta/protolint) - -### protolint Config file - -- `.github/linters/.protolintrc.yml` -- You can add, extend, and disable rules -- Documentation at [Rules](https://github.com/yoheimuta/protolint#rules) and [Configuring](https://github.com/yoheimuta/protolint#configuring) - -### protolint disable single line - -```protobuf -enum Foo { - // protolint:disable:next ENUM_FIELD_NAMES_UPPER_SNAKE_CASE - firstValue = 0; - second_value = 1; // protolint:disable:this ENUM_FIELD_NAMES_UPPER_SNAKE_CASE - THIRD_VALUE = 2; -} -``` - -### protolint disable code block - -```protobuf -// protolint:disable ENUM_FIELD_NAMES_UPPER_SNAKE_CASE -enum Foo { - firstValue = 0; - second_value = 1; - THIRD_VALUE = 2; -} -// protolint:enable ENUM_FIELD_NAMES_UPPER_SNAKE_CASE -``` - -### protolint disable entire file - -- You can disable entire files with the `lint.files.exclude` property in `.protolintrc.yml` - -```yaml -# Lint directives. -lint: - # Linter files to walk. - files: - # The specific files to exclude. - exclude: - - path/to/file -``` - -## Clojure - -- [clj-kondo](https://github.com/borkdude/clj-kondo) -- Since clj-kondo approaches static analysis in a very Clojure way, it is advised to read the [configuration docs](https://github.com/borkdude/clj-kondo/blob/master/doc/config.md) - -### clj-kondo standard Config file - -- `.github/linters/.clj-kondo/config.edn` - -### clj-kondo disable single line - -- There is currently **No** way to disable rules in a single line - -### clj-kondo disable code block - -- There is currently **No** way to disable rules in a code block - -### clj-kondo disable entire file - -````clojure -{:output {:exclude-files ["path/to/file"]}} - -## EDITORCONFIG-CHECKER -- [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) - --------------------------------------------------------------------------------- - -### editorconfig-checker Config file -- `.github/linters/.ecrc` -- This linter will also use the [`.editorconfig`](https://editorconfig.org/) of your project - -### editorconfig-checker disable single line -- -```js - // editorconfig-checker-disable-line -``` - -### editorconfig-checker disable code block - -- There is currently **No** way to disable rules inline of the file(s) - -### editorconfig-checker disable entire file - -- - -```js -// editorconfig-checker-disable-file -``` - -- You can disable entire files with the `Exclude` property in `.ecrc` - -```json -{ - "Exclude": ["path/to/file", "^regular\\/expression\\.ext$"] -} -``` - -## HTML - -- [htmlhint](https://htmlhint.com/) - -### htmlhint standard Config file - -- `.github/linters/.htmlhintrc` - -### htmlhint disable single line - -- There is currently **No** way to disable rules in a single line - -### htmlhint disable code block - -- There is currently **No** way to disable rules in a code block - -### htmlhint disable entire file - -- There is currently **No** way to disable rules in an entire file -```` diff --git a/lib/buildFileList.sh b/lib/buildFileList.sh index 70dc7c4d..d98e7e6f 100755 --- a/lib/buildFileList.sh +++ b/lib/buildFileList.sh @@ -16,11 +16,8 @@ function BuildFileList() { ################ # print header # ################ - if [[ ${ACTIONS_RUNNER_DEBUG} == "true" ]]; then - echo "" - echo "----------------------------------------------" - echo "Pulling in code history and branches..." - fi + debug "----------------------------------------------" + debug "Pulling in code history and branches..." ################################################################################# # Switch codebase back to the default branch to get a list of all files changed # @@ -40,19 +37,15 @@ function BuildFileList() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # Error - echo "Failed to switch to ${DEFAULT_BRANCH} branch to get files changed!" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${SWITCH_CMD}]${NC}" - exit 1 + info "Failed to switch to ${DEFAULT_BRANCH} branch to get files changed!" + fatal "[${SWITCH_CMD}]" fi ################ # print header # ################ - if [[ ${ACTIONS_RUNNER_DEBUG} == "true" ]]; then - echo "" - echo "----------------------------------------------" - echo "Generating Diff with:[git diff --name-only '${DEFAULT_BRANCH}..${GITHUB_SHA}' --diff-filter=d]" - fi + debug "----------------------------------------------" + debug "Generating Diff with:[git diff --name-only '${DEFAULT_BRANCH}..${GITHUB_SHA}' --diff-filter=d]" ################################################# # Get the Array of files changed in the commits # @@ -69,43 +62,42 @@ function BuildFileList() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # Error - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to gain a list of all files changed!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${RAW_FILE_ARRAY[*]}]${NC}" - exit 1 + error "Failed to gain a list of all files changed!" + fatal "[${RAW_FILE_ARRAY[*]}]" fi ################################################ # Iterate through the array of all files found # ################################################ - echo "" - echo "----------------------------------------------" - echo "Files that have been modified in the commit(s):" + info "----------------------------------------------" + info "Files that have been modified in the commit(s):" for FILE in "${RAW_FILE_ARRAY[@]}"; do ########################### # Get the files extension # ########################### - # Extract just the file and extension, reverse it, cut off extension, - # reverse it back, substitute to lowercase - FILE_TYPE=$(basename "${FILE}" | rev | cut -f1 -d'.' | rev | awk '{print tolower($0)}') + # Extract just the file extension + FILE_TYPE=${FILE##*.} + # To lowercase + FILE_TYPE=${FILE_TYPE,,} ############## # Print file # ############## - echo "File:[${FILE}], File_type:[${FILE_TYPE}]" + info "File:[${FILE}], File_type:[${FILE_TYPE}]" ######### # DEBUG # ######### - #echo "FILE_TYPE:[${FILE_TYPE}]" + debug "FILE_TYPE:[${FILE_TYPE}]" - ##################### - # Get the CFN files # - ##################### + ################################ + # Get the CLOUDFORMATION files # + ################################ if [ "${FILE_TYPE}" == "yml" ] || [ "${FILE_TYPE}" == "yaml" ]; then ################################ # Append the file to the array # ################################ - FILE_ARRAY_YML+=("${FILE}") + FILE_ARRAY_YAML+=("${FILE}") ########################################################## # Set the READ_ONLY_CHANGE_FLAG since this could be exec # ########################################################## @@ -118,7 +110,7 @@ function BuildFileList() { ################################ # Append the file to the array # ################################ - FILE_ARRAY_CFN+=("${FILE}") + FILE_ARRAY_CLOUDFORMATION+=("${FILE}") ########################################################## # Set the READ_ONLY_CHANGE_FLAG since this could be exec # @@ -158,7 +150,16 @@ function BuildFileList() { ################################ # Append the file to the array # ################################ - FILE_ARRAY_CFN+=("${FILE}") + FILE_ARRAY_CLOUDFORMATION+=("${FILE}") + fi + ############################################ + # Check if the file is AWS States Language # + ############################################ + if DetectAWSStatesFIle "${FILE}"; then + ################################ + # Append the file to the array # + ################################ + FILE_ARRAY_STATES+=("${FILE}") fi ########################################################## # Set the READ_ONLY_CHANGE_FLAG since this could be exec # @@ -211,9 +212,9 @@ function BuildFileList() { ###################### # Get the RAKU files # ###################### - elif [ "${FILE_TYPE}" == "raku" ] || [ "${FILE_TYPE}" == "rakumod" ] \ - || [ "${FILE_TYPE}" == "rakutest" ] || [ "${FILE_TYPE}" == "pm6" ] \ - || [ "${FILE_TYPE}" == "pl6" ] || [ "${FILE_TYPE}" == "p6" ] ; then + elif [ "${FILE_TYPE}" == "raku" ] || [ "${FILE_TYPE}" == "rakumod" ] || + [ "${FILE_TYPE}" == "rakutest" ] || [ "${FILE_TYPE}" == "pm6" ] || + [ "${FILE_TYPE}" == "pl6" ] || [ "${FILE_TYPE}" == "p6" ]; then ################################ # Append the file to the array # ################################ @@ -229,7 +230,10 @@ function BuildFileList() { ################################ # Append the file to the array # ################################ - FILE_ARRAY_PHP+=("${FILE}") + FILE_ARRAY_PHP_BUILTIN+=("${FILE}") + FILE_ARRAY_PHP_PHPCS+=("${FILE}") + FILE_ARRAY_PHP_PHPSTAN+=("${FILE}") + FILE_ARRAY_PHP_PSALM+=("${FILE}") ########################################################## # Set the READ_ONLY_CHANGE_FLAG since this could be exec # ########################################################## @@ -253,7 +257,8 @@ function BuildFileList() { ################################ # Append the file to the array # ################################ - FILE_ARRAY_PYTHON+=("${FILE}") + FILE_ARRAY_PYTHON_PYLINT+=("${FILE}") + FILE_ARRAY_PYTHON_FLAKE8+=("${FILE}") ########################################################## # Set the READ_ONLY_CHANGE_FLAG since this could be exec # ########################################################## @@ -343,6 +348,7 @@ function BuildFileList() { # Append the file to the array # ################################ FILE_ARRAY_TERRAFORM+=("${FILE}") + FILE_ARRAY_TERRAFORM_TERRASCAN+=("${FILE}") ########################################################## # Set the READ_ONLY_CHANGE_FLAG since this could be exec # ########################################################## @@ -382,6 +388,15 @@ function BuildFileList() { # Set the READ_ONLY_CHANGE_FLAG since this could be exec # ########################################################## READ_ONLY_CHANGE_FLAG=1 + elif [ "$FILE_TYPE" == "lua" ]; then + ################################ + # Append the file to the array # + ################################ + FILE_ARRAY_LUA+=("$FILE") + ########################################################## + # Set the READ_ONLY_CHANGE_FLAG since this could be exec # + ########################################################## + READ_ONLY_CHANGE_FLAG=1 ############################ # Get the Protocol Buffers files # ############################ @@ -430,6 +445,15 @@ function BuildFileList() { # Set the READ_ONLY_CHANGE_FLAG since this could be exec # ########################################################## READ_ONLY_CHANGE_FLAG=1 + elif [ "$FILE_TYPE" == "groovy" ] || [ "$FILE_TYPE" == "jenkinsfile" ] || [ "$FILE_TYPE" == "gradle" ]; then + ################################ + # Append the file to the array # + ################################ + FILE_ARRAY_GROOVY+=("$FILE") + ########################################################## + # Set the READ_ONLY_CHANGE_FLAG since this could be exec # + ########################################################## + READ_ONLY_CHANGE_FLAG=1 else ############################################## # Use file to see if we can parse what it is # @@ -443,8 +467,8 @@ function BuildFileList() { ####################### # It is a bash script # ####################### - echo -e "${NC}${F[Y]}WARN!${NC} Found bash script without extension:[.sh]${NC}" - echo "Please update file with proper extensions." + warn "Found bash script without extension:[.sh]" + info "Please update file with proper extensions." ################################ # Append the file to the array # ################################ @@ -457,8 +481,8 @@ function BuildFileList() { ####################### # It is a Ruby script # ####################### - echo -e "${NC}${F[Y]}WARN!${NC} Found ruby script without extension:[.rb]${NC}" - echo "Please update file with proper extensions." + warn "Found ruby script without extension:[.rb]" + info "Please update file with proper extensions." ################################ # Append the file to the array # ################################ @@ -471,7 +495,7 @@ function BuildFileList() { ############################ # Extension was not found! # ############################ - echo -e "${NC}${F[Y]} - WARN!${NC} Failed to get filetype for:[${FILE}]!${NC}" + warn "Failed to get filetype for:[${FILE}]!" ########################################################## # Set the READ_ONLY_CHANGE_FLAG since this could be exec # ########################################################## @@ -480,7 +504,7 @@ function BuildFileList() { fi done - echo ${READ_ONLY_CHANGE_FLAG} > /dev/null 2>&1 || true # Workaround SC2034 + export READ_ONLY_CHANGE_FLAG # Workaround SC2034 ######################################### # Need to switch back to branch of code # @@ -497,15 +521,13 @@ function BuildFileList() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # Error - echo "Failed to switch back to branch!" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${SWITCH2_CMD}]${NC}" - exit 1 + error "Failed to switch back to branch!" + fatal "[${SWITCH2_CMD}]" fi ################ # Footer print # ################ - echo "" - echo "----------------------------------------------" - echo -e "${NC}${F[B]}Successfully gathered list of files...${NC}" + info "----------------------------------------------" + info "Successfully gathered list of files..." } diff --git a/lib/linter.sh b/lib/linter.sh index ec63966c..19831687 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -10,7 +10,7 @@ # Source Function Files # ######################### # shellcheck source=/dev/null -source /action/lib/termColors.sh # Source the function script(s) +source /action/lib/log.sh # Source the function script(s) # shellcheck source=/dev/null source /action/lib/buildFileList.sh # Source the function script(s) # shellcheck source=/dev/null @@ -22,89 +22,134 @@ source /action/lib/worker.sh # Source the function script(s) # GLOBALS # ########### # Default Vars -DEFAULT_RULES_LOCATION='/action/lib/.automation' # Default rules files location -LINTER_RULES_PATH="${LINTER_RULES_PATH:-.github/linters}" # Linter Path Directory -# YAML Vars -YAML_FILE_NAME='.yaml-lint.yml' # Name of the file -YAML_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${YAML_FILE_NAME}" # Path to the yaml lint rules +DEFAULT_RULES_LOCATION='/action/lib/.automation' # Default rules files location +GITHUB_API_URL='https://api.github.com' # GitHub API root url +# Ansible Vars +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 +# Azure Resource Manager Vars +ARM_FILE_NAME='.arm-ttk.psd1' # Name of the file +ARM_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${ARM_FILE_NAME}" # Path to the ARM lint rules +# Cloudformation Vars +CLOUDFORMATION_FILE_NAME='.cfnlintrc.yml' # Name of the file +CLOUDFORMATION_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${CLOUDFORMATION_FILE_NAME}" # Path to the cloudformation lint rules +# Clojure Vars +CLOJURE_FILE_NAME='.clj-kondo/config.edn' # Name of the file +CLOJURE_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${CLOJURE_FILE_NAME}" # Path to the Clojure lint rules +# Coffee Vars +COFFEE_FILE_NAME='.coffee-lint.json' # Name of the file +COFFEESCRIPT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${COFFEE_FILE_NAME}" # Path to the coffeescript lint rules +# CSS Vars +CSS_FILE_NAME='.stylelintrc.json' # Name of the file +CSS_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${CSS_FILE_NAME}" # Path to the CSS lint rules +# Dart Vars +DART_FILE_NAME='analysis_options.yaml' # Name of the file +DART_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${DART_FILE_NAME}" # Path to the DART 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 +# 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 +# Groovy Vars +GROOVY_FILE_NAME='.groovylintrc.json' # Name of the file +GROOVY_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${GROOVY_FILE_NAME}" # Path to the Groovy lint rules +# HTML Vars +HTML_FILE_NAME='.htmlhintrc' # Name of the file +HTML_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${HTML_FILE_NAME}" # Path to the CSS lint rules +# Javascript Vars +JAVASCRIPT_FILE_NAME="${JAVASCRIPT_ES_CONFIG_FILE:-.eslintrc.yml}" # Name of the file +JAVASCRIPT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${JAVASCRIPT_FILE_NAME}" # Path to the Javascript lint rules +JAVASCRIPT_STANDARD_LINTER_RULES='' # ENV string to pass when running js standard +# Default linter path +LINTER_RULES_PATH="${LINTER_RULES_PATH:-.github/linters}" # Linter Path Directory +# Lua Vars +LUA_FILE_NAME='.luacheckrc' # Name of the file +LUA_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${LUA_FILE_NAME}" # Path to the Lua lint rules # MD Vars MARKDOWN_FILE_NAME='.markdown-lint.yml' # Name of the file -MARKDOWN_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${MARKDOWN_FILE_NAME}" # Path to the markdown lint rules -# Python Vars -PYTHON_FILE_NAME='.python-lint' # Name of the file -PYTHON_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PYTHON_FILE_NAME}" # Path to the python lint rules -# Cloudformation Vars -CFN_FILE_NAME='.cfnlintrc.yml' # Name of the file -CFN_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${CFN_FILE_NAME}" # Path to the cloudformation lint rules -# Ruby Vars -RUBY_FILE_NAME="${RUBY_CONFIG_FILE:-.ruby-lint.yml}" # Name of the file -RUBY_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${RUBY_FILE_NAME}" # Path to the ruby lint rules -# Coffee Vars -COFFEE_FILE_NAME='.coffee-lint.json' # Name of the file -COFFEESCRIPT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${COFFEE_FILE_NAME}" # Path to the coffeescript lint rules -# Javascript Vars -JAVASCRIPT_FILE_NAME="${JAVASCRIPT_ES_CONFIG_FILE:-.eslintrc.yml}" # Name of the file -JAVASCRIPT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${JAVASCRIPT_FILE_NAME}" # Path to the Javascript lint rules -JAVASCRIPT_STANDARD_LINTER_RULES='' # ENV string to pass when running js standard -# Typescript Vars -TYPESCRIPT_FILE_NAME="${TYPESCRIPT_ES_CONFIG_FILE:-.eslintrc.yml}" # Name of the file -TYPESCRIPT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${TYPESCRIPT_FILE_NAME}" # Path to the Typescript lint rules -TYPESCRIPT_STANDARD_LINTER_RULES='' # ENV string to pass when running js standard -# Ansible Vars -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 -# 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 -# Terraform Vars -TERRAFORM_FILE_NAME='.tflint.hcl' # Name of the file -TERRAFORM_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${TERRAFORM_FILE_NAME}" # Path to the Terraform lint rules -# Powershell Vars -POWERSHELL_FILE_NAME='.powershell-psscriptanalyzer.psd1' # Name of the file -POWERSHELL_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${POWERSHELL_FILE_NAME}" # Path to the Powershell lint rules -# Azure Resource Manager Vars -ARM_FILE_NAME='.arm-ttk.psd1' # Name of the file -ARM_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${ARM_FILE_NAME}" # Path to the ARM lint rules -# CSS Vars -CSS_FILE_NAME='.stylelintrc.json' # Name of the file -CSS_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${CSS_FILE_NAME}" # Path to the CSS lint rules +MARKDOWN_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${MARKDOWN_FILE_NAME}" # Path to the markdown lint rules # OpenAPI Vars -OPENAPI_FILE_NAME='.openapirc.yml' # Name of the file -OPENAPI_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${OPENAPI_FILE_NAME}" # Path to the OpenAPI lint rules +OPENAPI_FILE_NAME='.openapirc.yml' # Name of the file +OPENAPI_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${OPENAPI_FILE_NAME}" # Path to the OpenAPI lint rules +# PHPCS Vars +PHP_PHPCS_FILE_NAME='phpcs.xml' # Name of the file +PHP_PHPCS_LINTER_RULES="${GITHUB_WORKSPACE}/${PHP_PHPCS_FILE_NAME}" # Path to the PHP CodeSniffer lint rules in the repository +if [ ! -f "$PHP_PHPCS_LINTER_RULES" ]; then + PHP_PHPCS_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PHP_PHPCS_FILE_NAME}" # Path to the PHP CodeSniffer lint rules +fi +# PHPStan Vars +PHP_PHPSTAN_FILE_NAME='phpstan.neon' # Name of the file +PHP_PHPSTAN_LINTER_RULES="${GITHUB_WORKSPACE}/${PHP_PHPSTAN_FILE_NAME}" # Path to the PHPStan lint rules in the repository +if [ ! -f "$PHP_PHPSTAN_LINTER_RULES" ]; then + PHP_PHPSTAN_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PHP_PHPSTAN_FILE_NAME}" # Path to the PHPStan lint rules +fi +# Psalm Vars +PHP_PSALM_FILE_NAME='psalm.xml' # Name of the file +PHP_PSALM_LINTER_RULES="${GITHUB_WORKSPACE}/${PHP_PSALM_FILE_NAME}" # Path to the Psalm lint rules in the repository +if [ ! -f "$PHP_PSALM_LINTER_RULES" ]; then + PHP_PSALM_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PHP_PSALM_FILE_NAME}" # Path to the Psalm lint rules +fi +# Powershell Vars +POWERSHELL_FILE_NAME='.powershell-psscriptanalyzer.psd1' # Name of the file +POWERSHELL_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${POWERSHELL_FILE_NAME}" # Path to the Powershell lint rules # Protocol Buffers Vars PROTOBUF_FILE_NAME='.protolintrc.yml' # Name of the file -PROTOBUF_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PROTOBUF_FILE_NAME}" # Path to the Protocol Buffers lint rules -# Clojure Vars -CLOJURE_FILE_NAME='.clj-kondo/config.edn' # Name of the file -CLOJURE_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${CLOJURE_FILE_NAME}" # Path to the Clojure lint rules -# Dart Vars -DART_FILE_NAME='analysis_options.yaml' # Name of the file -DART_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${DART_FILE_NAME}" # Path to the DART lint rules -# HTML Vars -HTML_FILE_NAME='.htmlhintrc' # Name of the file -HTML_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${HTML_FILE_NAME}" # Path to the CSS lint rules +PROTOBUF_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PROTOBUF_FILE_NAME}" # Path to the Protocol Buffers lint rules +# Python Vars +PYTHON_PYLINT_FILE_NAME="${PYTHON_PYLINT_CONFIG_FILE:-.python-lint}" # Name of the file +PYTHON_PYLINT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PYTHON_PYLINT_FILE_NAME}" # Path to the python lint rules +PYTHON_FLAKE8_FILE_NAME="${PYTHON_FLAKE8_CONFIG_FILE:-.flake8}" # Name of the file +PYTHON_FLAKE8_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${PYTHON_FLAKE8_FILE_NAME}" # Path to the python lint rules +# Ruby Vars +RUBY_FILE_NAME="${RUBY_CONFIG_FILE:-.ruby-lint.yml}" # Name of the file +RUBY_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${RUBY_FILE_NAME}" # Path to the ruby lint rules +# Terraform Vars +TERRAFORM_FILE_NAME='.tflint.hcl' # Name of the file +TERRAFORM_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${TERRAFORM_FILE_NAME}" # Path to the Terraform lint rules +# Typescript Vars +TYPESCRIPT_FILE_NAME="${TYPESCRIPT_ES_CONFIG_FILE:-.eslintrc.yml}" # Name of the file +TYPESCRIPT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${TYPESCRIPT_FILE_NAME}" # Path to the Typescript lint rules +TYPESCRIPT_STANDARD_LINTER_RULES='' # ENV string to pass when running js standard +# YAML Vars +YAML_FILE_NAME="${YAML_CONFIG_FILE:-.yaml-lint.yml}" # Name of the file +YAML_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${YAML_FILE_NAME}" # Path to the yaml lint rules ####################################### # Linter array for information prints # ####################################### +<<<<<<< HEAD LINTER_ARRAY=("jsonlint" "yamllint" "xmllint" "markdownlint" "shellcheck" "pylint" "perl" "raku" "rubocop" "coffeelint" "eslint" "standard" "ansible-lint" "dockerfilelint" "golangci-lint" "tflint" "stylelint" "dotenv-linter" "pwsh" "arm-ttk" "ktlint" "protolint" "clj-kondo" "spectral" "cfn-lint" "dart" "htmlhint" "checkstyle") +======= +LINTER_ARRAY=('ansible-lint' 'arm-ttk' 'asl-validator' 'cfn-lint' 'clj-kondo' 'coffeelint' + 'dart' 'dockerfilelint' 'dotenv-linter' 'eslint' 'flake8' 'golangci-lint' 'htmlhint' + 'jsonlint' 'ktlint' 'lua' 'markdownlint' 'npm-groovy-lint' 'perl' 'protolint' 'pwsh' + 'pylint' 'raku' 'rubocop' 'shellcheck' 'spectral' 'standard' 'stylelint' 'terrascan' + 'tflint' 'xmllint' 'yamllint') +>>>>>>> master ############################# # Language array for prints # ############################# +<<<<<<< HEAD LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'CFN' 'CLOJURE' 'COFFEESCRIPT' 'CSS' 'DART' 'DOCKER' 'ENV' 'GO' 'HTML' 'JAVA' 'JAVASCRIPT_ES' 'JAVASCRIPT_STANDARD' 'JSON' 'JSX' 'KOTLIN' 'OPENAPI' 'MARKDOWN' 'PERL' 'PHP' 'POWERSHELL' 'PROTOBUF' 'PYTHON' 'RAKU' 'RUBY' 'TERRAFORM' 'TSX' 'TYPESCRIPT_ES' 'TYPESCRIPT_STANDARD' 'XML' 'YML' ) +======= +LANGUAGE_ARRAY=('ANSIBLE' 'ARM' 'BASH' 'CLOUDFORMATION' 'CLOJURE' 'COFFEESCRIPT' 'CSS' + 'DART' 'DOCKER' 'ENV' 'GO' 'GROOVY' 'HTML' 'JAVASCRIPT_ES' 'JAVASCRIPT_STANDARD' + 'JSON' 'JSX' 'KOTLIN' 'LUA' 'MARKDOWN' 'OPENAPI' 'PERL' 'PHP_BUILTIN' 'PHP_PHPCS' + 'PHP_PHPSTAN' 'PHP_PSALM' 'POWERSHELL' 'PROTOBUF' 'PYTHON_PYLINT' 'PYTHON_FLAKE8' + 'RAKU' 'RUBY' 'STATES' 'TERRAFORM' 'TERRAFORM_TERRASCAN' 'TSX' 'TYPESCRIPT_ES' + 'TYPESCRIPT_STANDARD' 'XML' 'YAML') +>>>>>>> master ############################################ # Array for all languages that were linted # @@ -114,6 +159,7 @@ LINTED_LANGUAGES_ARRAY=() # Will be filled at run time with all languages that w ################### # GitHub ENV Vars # ################### +<<<<<<< HEAD GITHUB_SHA="${GITHUB_SHA}" # GitHub sha from the commit GITHUB_EVENT_PATH="${GITHUB_EVENT_PATH}" # Github Event Path GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # Github Workspace @@ -159,6 +205,62 @@ VALIDATE_XML="${VALIDATE_XML}" # Boolean to vali VALIDATE_YAML="${VALIDATE_YAML}" # Boolean to validate language TEST_CASE_RUN="${TEST_CASE_RUN}" # Boolean to validate only test cases DISABLE_ERRORS="${DISABLE_ERRORS}" # Boolean to enable warning-only output without throwing errors +======= +ANSIBLE_DIRECTORY="${ANSIBLE_DIRECTORY}" # Ansible Directory +DEFAULT_BRANCH="${DEFAULT_BRANCH:-master}" # Default Git Branch to use (master by default) +DISABLE_ERRORS="${DISABLE_ERRORS}" # Boolean to enable warning-only output without throwing errors +GITHUB_EVENT_PATH="${GITHUB_EVENT_PATH}" # Github Event Path +GITHUB_REPOSITORY="${GITHUB_REPOSITORY}" # GitHub Org/Repo passed from system +GITHUB_RUN_ID="${GITHUB_RUN_ID}" # GitHub RUn ID to point to logs +GITHUB_SHA="${GITHUB_SHA}" # GitHub sha from the commit +GITHUB_TOKEN="${GITHUB_TOKEN}" # GitHub Token passed from environment +GITHUB_WORKSPACE="${GITHUB_WORKSPACE}" # Github Workspace +LOG_FILE="${LOG_FILE:-super-linter.log}" # Default log file name (located in GITHUB_WORKSPACE folder) +LOG_LEVEL="${LOG_LEVEL:-VERBOSE}" # Default log level (VERBOSE, DEBUG, TRACE) +MULTI_STATUS="${MULTI_STATUS:-true}" # Multiple status are created for each check ran +TEST_CASE_RUN="${TEST_CASE_RUN}" # Boolean to validate only test cases +VALIDATE_ALL_CODEBASE="${VALIDATE_ALL_CODEBASE}" # Boolean to validate all files +VALIDATE_ANSIBLE="${VALIDATE_ANSIBLE}" # Boolean to validate language +VALIDATE_ARM="${VALIDATE_ARM}" # Boolean to validate language +VALIDATE_BASH="${VALIDATE_BASH}" # Boolean to validate language +VALIDATE_CLOUDFORMATION="${VALIDATE_CLOUDFORMATION}" # Boolean to validate language +VALIDATE_CLOJURE="${VALIDATE_CLOJURE}" # Boolean to validate language +VALIDATE_COFFEE="${VALIDATE_COFFEE}" # Boolean to validate language +VALIDATE_CSS="${VALIDATE_CSS}" # Boolean to validate language +VALIDATE_DART="${VALIDATE_DART}" # Boolean to validate language +VALIDATE_DOCKER="${VALIDATE_DOCKER}" # Boolean to validate language +VALIDATE_EDITORCONFIG="${VALIDATE_EDITORCONFIG}" # Boolean to validate files with editorconfig +VALIDATE_ENV="${VALIDATE_ENV}" # Boolean to validate language +VALIDATE_GO="${VALIDATE_GO}" # Boolean to validate language +VALIDATE_GROOVY="${VALIDATE_GROOVY}" # Boolean to validate language +VALIDATE_HTML="${VALIDATE_HTML}" # Boolean to validate language +VALIDATE_JAVASCRIPT_ES="${VALIDATE_JAVASCRIPT_ES}" # Boolean to validate language +VALIDATE_JAVASCRIPT_STANDARD="${VALIDATE_JAVASCRIPT_STANDARD}" # Boolean to validate language +VALIDATE_JSON="${VALIDATE_JSON}" # Boolean to validate language +VALIDATE_JSX="${VALIDATE_JSX}" # Boolean to validate language +VALIDATE_KOTLIN="${VALIDATE_KOTLIN}" # Boolean to validate language +VALIDATE_LUA="${VALIDATE_LUA}" # Boolean to validate language +VALIDATE_MARKDOWN="${VALIDATE_MD:-}" # Boolean to validate language +VALIDATE_OPENAPI="${VALIDATE_OPENAPI}" # Boolean to validate language +VALIDATE_PERL="${VALIDATE_PERL}" # Boolean to validate language +VALIDATE_PHP_BUILTIN="${VALIDATE_PHP:-VALIDATE_PHP_BUILTIN}" # Boolean to validate language +VALIDATE_PHP_PHPCS="${VALIDATE_PHP_PHPCS}" # Boolean to validate language +VALIDATE_PHP_PHPSTAN="${VALIDATE_PHP_PHPSTAN}" # Boolean to validate language +VALIDATE_PHP_PSALM="${VALIDATE_PHP_PSALM}" # Boolean to validate language +VALIDATE_POWERSHELL="${VALIDATE_POWERSHELL}" # Boolean to validate language +VALIDATE_PYTHON_PYLINT="${VALIDATE_PYTHON:-$VALIDATE_PYTHON_PYLINT}" # Boolean to validate language +VALIDATE_PYTHON_FLAKE8="${VALIDATE_PYTHON_FLAKE8}" # Boolean to validate language +VALIDATE_RAKU="${VALIDATE_RAKU}" # Boolean to validate language +VALIDATE_RUBY="${VALIDATE_RUBY}" # Boolean to validate language +VALIDATE_STATES="${VALIDATE_STATES}" # Boolean to validate language +VALIDATE_TERRAFORM="${VALIDATE_TERRAFORM}" # Boolean to validate language +VALIDATE_TERRAFORM_TERRASCAN="${VALIDATE_TERRAFORM_TERRASCAN}" # Boolean to validate language +VALIDATE_TSX="${VALIDATE_TSX}" # Boolean to validate language +VALIDATE_TYPESCRIPT_ES="${VALIDATE_TYPESCRIPT_ES}" # Boolean to validate language +VALIDATE_TYPESCRIPT_STANDARD="${VALIDATE_TYPESCRIPT_STANDARD}" # Boolean to validate language +VALIDATE_XML="${VALIDATE_XML}" # Boolean to validate language +VALIDATE_YAML="${VALIDATE_YAML}" # Boolean to validate language +>>>>>>> master ############## # Debug Vars # @@ -166,6 +268,20 @@ DISABLE_ERRORS="${DISABLE_ERRORS}" # Boolean to enab RUN_LOCAL="${RUN_LOCAL}" # Boolean to see if we are running locally ACTIONS_RUNNER_DEBUG="${ACTIONS_RUNNER_DEBUG:-false}" # Boolean to see even more info (debug) +############ +# Log Vars # +############ +if [[ ${ACTIONS_RUNNER_DEBUG} == true ]]; then LOG_LEVEL="DEBUG"; fi +# Boolean to see trace logs +LOG_TRACE=$(if [[ ${LOG_LEVEL} == "TRACE" ]]; then echo "true"; fi) +export LOG_TRACE +# Boolean to see debug logs +LOG_DEBUG=$(if [[ ${LOG_LEVEL} == "DEBUG" || ${LOG_LEVEL} == "TRACE" ]]; then echo "true"; fi) +export LOG_DEBUG +# Boolean to see verbose logs (info function) +LOG_VERBOSE=$(if [[ ${LOG_LEVEL} == "VERBOSE" || ${LOG_LEVEL} == "DEBUG" || ${LOG_LEVEL} == "TRACE" ]]; then echo "true"; fi) +export LOG_VERBOSE + ################ # Default Vars # ################ @@ -173,23 +289,23 @@ DEFAULT_VALIDATE_ALL_CODEBASE='true' # Default value for validate DEFAULT_WORKSPACE="${DEFAULT_WORKSPACE:-/tmp/lint}" # Default workspace if running locally DEFAULT_RUN_LOCAL='false' # Default value for debugging locally DEFAULT_TEST_CASE_RUN='false' # Flag to tell code to run only test cases -DEFAULT_IFS="${IFS}" # Get the Default IFS for updating +DEFAULT_IFS="${IFS}" # Get the Default IFS for updating ############################################################### # Default Vars that are called in Subs and need to be ignored # ############################################################### -DEFAULT_DISABLE_ERRORS='false' # Default to enabling errors -echo "${DEFAULT_DISABLE_ERRORS}" > /dev/null 2>&1 || true # Workaround SC2034 -RAW_FILE_ARRAY=() # Array of all files that were changed -echo "${RAW_FILE_ARRAY[*]}" > /dev/null 2>&1 || true # Workaround SC2034 -READ_ONLY_CHANGE_FLAG=0 # Flag set to 1 if files changed are not txt or md -echo "${READ_ONLY_CHANGE_FLAG}" > /dev/null 2>&1 || true # Workaround SC2034 -TEST_CASE_FOLDER='.automation/test' # Folder for test cases we should always ignore -echo "${TEST_CASE_FOLDER}" > /dev/null 2>&1 || true # Workaround SC2034 -DEFAULT_ANSIBLE_DIRECTORY="${GITHUB_WORKSPACE}/ansible" # Default Ansible Directory -echo "${DEFAULT_ANSIBLE_DIRECTORY}" > /dev/null 2>&1 || true # Workaround SC2034 -WARNING_ARRAY_TEST=() # Array of warning linters that did not have an expected test result. -echo "${WARNING_ARRAY_TEST[*]}" > /dev/null 2>&1 || true # Workaround SC2034 +DEFAULT_DISABLE_ERRORS='false' # Default to enabling errors +export DEFAULT_DISABLE_ERRORS # Workaround SC2034 +RAW_FILE_ARRAY=() # Array of all files that were changed +export RAW_FILE_ARRAY # Workaround SC2034 +READ_ONLY_CHANGE_FLAG=0 # Flag set to 1 if files changed are not txt or md +export READ_ONLY_CHANGE_FLAG # Workaround SC2034 +TEST_CASE_FOLDER='.automation/test' # Folder for test cases we should always ignore +export TEST_CASE_FOLDER # Workaround SC2034 +DEFAULT_ANSIBLE_DIRECTORY="${GITHUB_WORKSPACE}/ansible" # Default Ansible Directory +export DEFAULT_ANSIBLE_DIRECTORY # Workaround SC2034 +WARNING_ARRAY_TEST=() # Array of warning linters that did not have an expected test result. +export WARNING_ARRAY_TEST # Workaround SC2034 ############## # Format # @@ -197,14 +313,14 @@ echo "${WARNING_ARRAY_TEST[*]}" > /dev/null 2>&1 || true # Workaround SC2034 OUTPUT_FORMAT="${OUTPUT_FORMAT}" # Output format to be generated. Default none OUTPUT_FOLDER="${OUTPUT_FOLDER:-super-linter.report}" # Folder where the reports are generated. Default super-linter.report OUTPUT_DETAILS="${OUTPUT_DETAILS:-simpler}" # What level of details. (simpler or detailed). Default simpler -REPORT_OUTPUT_FOLDER="${DEFAULT_WORKSPACE}/${OUTPUT_FOLDER}" +REPORT_OUTPUT_FOLDER="${DEFAULT_WORKSPACE}/${OUTPUT_FOLDER}" # Location for the report folder ########################## # Array of changed files # ########################## FILE_ARRAY_ARM=() # Array of files to check FILE_ARRAY_BASH=() # Array of files to check -FILE_ARRAY_CFN=() # Array of files to check +FILE_ARRAY_CLOUDFORMATION=() # Array of files to check FILE_ARRAY_CLOJURE=() # Array of files to check FILE_ARRAY_COFFEESCRIPT=() # Array of files to check FILE_ARRAY_CSS=() # Array of files to check @@ -212,6 +328,7 @@ FILE_ARRAY_DART=() # Array of files to check FILE_ARRAY_DOCKER=() # Array of files to check FILE_ARRAY_ENV=() # Array of files to check FILE_ARRAY_GO=() # Array of files to check +FILE_ARRAY_GROOVY=() # Array of files to check FILE_ARRAY_HTML=() # Array of files to check FILE_ARRAY_JAVA=() # Array of files to check FILE_ARRAY_JAVASCRIPT_ES=() # Array of files to check @@ -219,25 +336,32 @@ FILE_ARRAY_JAVASCRIPT_STANDARD=() # Array of files to check FILE_ARRAY_JSON=() # Array of files to check FILE_ARRAY_JSX=() # Array of files to check FILE_ARRAY_KOTLIN=() # Array of files to check +FILE_ARRAY_LUA=() # Array of files to check FILE_ARRAY_MARKDOWN=() # Array of files to check FILE_ARRAY_OPENAPI=() # Array of files to check FILE_ARRAY_PERL=() # Array of files to check -FILE_ARRAY_PHP=() # Array of files to check +FILE_ARRAY_PHP_BUILTIN=() # Array of files to check +FILE_ARRAY_PHP_PHPCS=() # Array of files to check +FILE_ARRAY_PHP_PHPSTAN=() # Array of files to check +FILE_ARRAY_PHP_PSALM=() # Array of files to check FILE_ARRAY_POWERSHELL=() # Array of files to check FILE_ARRAY_PROTOBUF=() # Array of files to check -FILE_ARRAY_PYTHON=() # Array of files to check +FILE_ARRAY_PYTHON_PYLINT=() # Array of files to check +FILE_ARRAY_PYTHON_FLAKE8=() # Array of files to check FILE_ARRAY_RAKU=() # Array of files to check FILE_ARRAY_RUBY=() # Array of files to check +FILE_ARRAY_STATES=() # Array of files to check FILE_ARRAY_TERRAFORM=() # Array of files to check FILE_ARRAY_TSX=() # Array of files to check FILE_ARRAY_TYPESCRIPT_ES=() # Array of files to check FILE_ARRAY_TYPESCRIPT_STANDARD=() # Array of files to check FILE_ARRAY_XML=() # Array of files to check -FILE_ARRAY_YML=() # Array of files to check +FILE_ARRAY_YAML=() # Array of files to check ############ # Counters # ############ +<<<<<<< HEAD ERRORS_FOUND_ANSIBLE=0 # Count of errors found ERRORS_FOUND_ARM=0 # Count of errors found ERRORS_FOUND_BASH=0 # Count of errors found @@ -271,6 +395,88 @@ ERRORS_FOUND_TYPESCRIPT_STANDARD=0 # Count of errors found ERRORS_FOUND_TYPESCRIPT_ES=0 # Count of errors found ERRORS_FOUND_XML=0 # Count of errors found ERRORS_FOUND_YML=0 # Count of errors found +======= +ERRORS_FOUND_ANSIBLE=0 # Count of errors found +export ERRORS_FOUND_ANSIBLE # Workaround SC2034 +ERRORS_FOUND_ARM=0 # Count of errors found +export ERRORS_FOUND_ARM # Workaround SC2034 +ERRORS_FOUND_BASH=0 # Count of errors found +export ERRORS_FOUND_BASH # Workaround SC2034 +ERRORS_FOUND_CLOUDFORMATION=0 # Count of errors found +export ERRORS_FOUND_CLOUDFORMATION # Workaround SC2034 +ERRORS_FOUND_CLOJURE=0 # Count of errors found +export ERRORS_FOUND_CLOJURE # Workaround SC2034 +ERRORS_FOUND_CSS=0 # Count of errors found +export ERRORS_FOUND_CSS # Workaround SC2034 +ERRORS_FOUND_COFFEESCRIPT=0 # Count of errors found +export ERRORS_FOUND_COFFEESCRIPT # Workaround SC2034 +ERRORS_FOUND_DART=0 # Count of errors found +export ERRORS_FOUND_DART # Workaround SC2034 +ERRORS_FOUND_DOCKER=0 # Count of errors found +export ERRORS_FOUND_DOCKER # Workaround SC2034 +ERRORS_FOUND_ENV=0 # Count of errors found +export ERRORS_FOUND_ENV # Workaround SC2034 +ERRORS_FOUND_GO=0 # Count of errors found +export ERRORS_FOUND_GO # Workaround SC2034 +ERRORS_FOUND_GROOVY=0 # Count of errors found +export ERRORS_FOUND_GROOVY # Workaround SC2034 +ERRORS_FOUND_HTML=0 # Count of errors found +export ERRORS_FOUND_HTML # Workaround SC2034 +ERRORS_FOUND_JAVASCRIPT_STANDARD=0 # Count of errors found +export ERRORS_FOUND_JAVASCRIPT_STANDARD # Workaround SC2034 +ERRORS_FOUND_JAVASCRIPT_ES=0 # Count of errors found +export ERRORS_FOUND_JAVASCRIPT_ES # Workaround SC2034 +ERRORS_FOUND_JSON=0 # Count of errors found +export ERRORS_FOUND_JSON # Workaround SC2034 +ERRORS_FOUND_JSX=0 # Count of errors found +export ERRORS_FOUND_JSX # Workaround SC2034 +ERRORS_FOUND_KOTLIN=0 # Count of errors found +export ERRORS_FOUND_KOTLIN # Workaround SC2034 +ERRORS_FOUND_LUA=0 # Count of errors found +export ERRORS_FOUND_LUA=0 # Workaround SC2034 +ERRORS_FOUND_MARKDOWN=0 # Count of errors found +export ERRORS_FOUND_MARKDOWN # Workaround SC2034 +ERRORS_FOUND_OPENAPI=0 # Count of errors found +export ERRORS_FOUND_OPENAPI # Workaround SC2034 +ERRORS_FOUND_PERL=0 # Count of errors found +export ERRORS_FOUND_PERL # Workaround SC2034 +ERRORS_FOUND_PHP_BUILTIN=0 # Count of errors found +export ERRORS_FOUND_PHP_BUILTIN # Workaround SC2034 +ERRORS_FOUND_PHP_PHPCS=0 # Count of errors found +export ERRORS_FOUND_PHP_PHPCS # Workaround SC2034 +ERRORS_FOUND_PHP_PHPSTAN=0 # Count of errors found +export ERRORS_FOUND_PHP_PHPSTAN # Workaround SC2034 +ERRORS_FOUND_PHP_PSALM=0 # Count of errors found +export ERRORS_FOUND_PHP_PSALM # Workaround SC2034 +ERRORS_FOUND_POWERSHELL=0 # Count of errors found +export ERRORS_FOUND_POWERSHELL # Workaround SC2034 +ERRORS_FOUND_PROTOBUF=0 # Count of errors found +export ERRORS_FOUND_PROTOBUF # Workaround SC2034 +ERRORS_FOUND_PYTHON_PYLINT=0 # Count of errors found +export ERRORS_FOUND_PYTHON_PYLINT # Workaround SC2034 +ERRORS_FOUND_PYTHON_FLAKE8=0 # Count of errors found +export ERRORS_FOUND_PYTHON_FLAKE8 # Workaround SC2034 +ERRORS_FOUND_RAKU=0 # Count of errors found +export ERRORS_FOUND_RAKU # Workaround SC2034 +ERRORS_FOUND_RUBY=0 # Count of errors found +export ERRORS_FOUND_RUBY # Workaround SC2034 +ERRORS_FOUND_STATES=0 # Count of errors found +export ERRORS_FOUND_STATES # Workaround SC2034 +ERRORS_FOUND_TERRAFORM=0 # Count of errors found +export ERRORS_FOUND_TERRAFORM # Workaround SC2034 +ERRORS_FOUND_TERRAFORM_TERRASCAN=0 # Count of errors found +export ERRORS_FOUND_TERRAFORM_TERRASCAN # Workaround SC2034 +ERRORS_FOUND_TSX=0 # Count of errors found +export ERRORS_FOUND_TSX # Workaround SC2034 +ERRORS_FOUND_TYPESCRIPT_STANDARD=0 # Count of errors found +export ERRORS_FOUND_TYPESCRIPT_STANDARD # Workaround SC2034 +ERRORS_FOUND_TYPESCRIPT_ES=0 # Count of errors found +export ERRORS_FOUND_TYPESCRIPT_ES # Workaround SC2034 +ERRORS_FOUND_XML=0 # Count of errors found +export ERRORS_FOUND_XML # Workaround SC2034 +ERRORS_FOUND_YAML=0 # Count of errors found +export ERRORS_FOUND_YAML # Workaround SC2034 +>>>>>>> master ################################################################################ ########################## FUNCTIONS BELOW ##################################### @@ -286,15 +492,13 @@ Header() { ########## # Prints # ########## - echo "" - echo "---------------------------------------------" - echo "--- GitHub Actions Multi Language Linter ----" - echo "---------------------------------------------" - echo "" - echo "---------------------------------------------" - echo "The Super-Linter source code can be found at:" - echo " - https://github.com/github/super-linter" - echo "---------------------------------------------" + info "---------------------------------------------" + info "--- GitHub Actions Multi Language Linter ----" + info "---------------------------------------------" + info "---------------------------------------------" + info "The Super-Linter source code can be found at:" + info " - https://github.com/github/super-linter" + info "---------------------------------------------" } ################################################################################ #### Function GetLinterVersions ################################################ @@ -302,21 +506,20 @@ GetLinterVersions() { ######################### # Print version headers # ######################### - echo "" - echo "---------------------------------------------" - echo "Linter Version Info:" + debug "---------------------------------------------" + debug "Linter Version Info:" ########################################################## # Go through the array of linters and print version info # ########################################################## for LINTER in "${LINTER_ARRAY[@]}"; do - ################### - # Get the version # - ################### - if [[ "${LINTER}" == "arm-ttk" ]]; then + #################### + # Get the versions # + #################### + if [[ ${LINTER} == "arm-ttk" ]]; then # Need specific command for ARM mapfile -t GET_VERSION_CMD < <(grep -iE 'version' "${ARM_TTK_PSD1}" | xargs 2>&1) - elif [[ "${LINTER}" == "protolint" ]]; then + elif [[ ${LINTER} == "protolint" ]]; then # Need specific command for Protolint mapfile -t GET_VERSION_CMD < <(echo "--version not supported") else @@ -333,20 +536,19 @@ GetLinterVersions() { # Check the shell for errors # ############################## if [ ${ERROR_CODE} -ne 0 ] || [ -z "${GET_VERSION_CMD[*]}" ]; then - echo -e "${NC}[${LINTER}]: ${F[Y]}WARN!${NC} Failed to get version info for:${NC}" + warn "[${LINTER}]: Failed to get version info for:" else ########################## # Print the version info # ########################## - echo -e "${NC}${F[B]}Successfully found version for ${F[W]}[${LINTER}]${F[B]}: ${F[W]}${GET_VERSION_CMD[*]}${NC}" + debug "Successfully found version for ${F[W]}[${LINTER}]${F[B]}: ${F[W]}${GET_VERSION_CMD[*]}" fi done ######################### # Print version footers # ######################### - echo "---------------------------------------------" - echo "" + debug "---------------------------------------------" } ################################################################################ #### Function GetLinterRules ################################################### @@ -368,8 +570,8 @@ GetLinterRules() { # Validate we have the linter rules # ##################################### if [ -f "${GITHUB_WORKSPACE}/${LINTER_RULES_PATH}/${!LANGUAGE_FILE_NAME}" ]; then - echo "----------------------------------------------" - echo "User provided file:[${!LANGUAGE_FILE_NAME}], setting rules file..." + info "----------------------------------------------" + info "User provided file:[${!LANGUAGE_FILE_NAME}], setting rules file..." ######################################## # Update the path to the file location # @@ -379,9 +581,7 @@ GetLinterRules() { ######################################################## # No user default provided, using the template default # ######################################################## - if [[ ${ACTIONS_RUNNER_DEBUG} == "true" ]]; then - echo " -> Codebase does NOT have file:[${LINTER_RULES_PATH}/${!LANGUAGE_FILE_NAME}], using Default rules at:[${!LANGUAGE_LINTER_RULES}]" - fi + debug " -> Codebase does NOT have file:[${LINTER_RULES_PATH}/${!LANGUAGE_FILE_NAME}], using Default rules at:[${!LANGUAGE_LINTER_RULES}]" fi } ################################################################################ @@ -421,9 +621,8 @@ GetStandardRules() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # ERROR - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to gain list of ENV vars to load!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GET_ENV_ARRAY[*]}]${NC}" - exit 1 + error "Failed to gain list of ENV vars to load!" + fatal "[${GET_ENV_ARRAY[*]}]" fi ########################## @@ -449,7 +648,7 @@ GetStandardRules() { # Get the env to add to string # ################################ ENV="$(echo "${ENV}" | cut -d'"' -f2)" - # echo "ENV:[${ENV}]" + debug "ENV:[${ENV}]" ENV_STRING+="--env ${ENV} " done @@ -541,52 +740,54 @@ DetectCloudFormationFile() { ####################################### # Check if file has AWS Template info # ####################################### - if grep 'AWSTemplateFormatVersion' "${FILE}" > /dev/null; then + if grep -q 'AWSTemplateFormatVersion' "${FILE}" > /dev/null; then # Found it return 0 fi - ################################################### - # Check if file has AWSTemplateFormatVersion info # - ################################################### - if shyaml --quiet get-type AWSTemplateFormatVersion > /dev/null < "${FILE}"; then + ##################################### + # See if it contains AWS References # + ##################################### + if grep -q -E '(AWS|Alexa|Custom)::' "${FILE}" > /dev/null; then # Found it return 0 fi + ##################################################### + # No identifiers of a CLOUDFORMATION template found # + ##################################################### + return 1 +} +################################################################################ +#### Function DetectAWSStatesFIle ############################################## +DetectAWSStatesFIle() { + ################ + # Pull in Vars # + ################ + FILE="${1}" # File that we need to validate + + # https://states-language.net/spec.html#example ############################### # check if file has resources # ############################### - if jq -e 'has("Resources")' > /dev/null 2>&1 < "${FILE}"; then - # Check if AWS Alexa or custom - if jq ".Resources[].Type" 2> /dev/null | grep -q -E "(AWS|Alexa|Custom)" < "${FILE}"; then - # Found it - return 0 - fi - fi - - ################################ - # See if it contains resources # - ################################ - if shyaml values-0 Resources 2> /dev/null | grep -q -E "Type: (AWS|Alexa|Custom)" < "${FILE}"; then + if grep '"Resource": *"arn"*' "${FILE}"; then # Found it return 0 fi - ########################################## - # No identifiers of a CFN template found # - ########################################## + ################################################# + # No identifiers of a AWS States Language found # + ################################################# return 1 } - ################################################################################ #### Function GetGitHubVars #################################################### GetGitHubVars() { ########## # Prints # ########## - echo "--------------------------------------------" - echo "Gathering GitHub information..." + info "--------------------------------------------" + info "Gathering GitHub information..." ############################### # Get the Run test cases flag # @@ -625,8 +826,8 @@ GetGitHubVars() { ########################################## # We are running locally for a debug run # ########################################## - echo "NOTE: ENV VAR [RUN_LOCAL] has been set to:[true]" - echo "bypassing GitHub Actions variables..." + info "NOTE: ENV VAR [RUN_LOCAL] has been set to:[true]" + info "bypassing GitHub Actions variables..." ############################ # Set the GITHUB_WORKSPACE # @@ -636,11 +837,10 @@ GetGitHubVars() { fi if [ ! -d "${GITHUB_WORKSPACE}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC} Provided volume is not a directory!${NC}" - exit 1 + fatal "Provided volume is not a directory!" fi - echo "Linting all files in mapped directory:[${DEFAULT_WORKSPACE}]" + info "Linting all files in mapped directory:[${DEFAULT_WORKSPACE}]" # No need to touch or set the GITHUB_SHA # No need to touch or set the GITHUB_EVENT_PATH @@ -656,33 +856,30 @@ GetGitHubVars() { # Validate we have a value # ############################ if [ -z "${GITHUB_SHA}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GITHUB_SHA]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GITHUB_SHA}]${NC}" - exit 1 + error "Failed to get [GITHUB_SHA]!" + fatal "[${GITHUB_SHA}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_SHA]${F[B]}, value:${F[W]}[${GITHUB_SHA}]${NC}" + info "Successfully found:${F[W]}[GITHUB_SHA]${F[B]}, value:${F[W]}[${GITHUB_SHA}]" fi ############################ # Validate we have a value # ############################ if [ -z "${GITHUB_WORKSPACE}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GITHUB_WORKSPACE]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GITHUB_WORKSPACE}]${NC}" - exit 1 + error "Failed to get [GITHUB_WORKSPACE]!" + fatal "[${GITHUB_WORKSPACE}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_WORKSPACE]${F[B]}, value:${F[W]}[${GITHUB_WORKSPACE}]${NC}" + info "Successfully found:${F[W]}[GITHUB_WORKSPACE]${F[B]}, value:${F[W]}[${GITHUB_WORKSPACE}]" fi ############################ # Validate we have a value # ############################ if [ -z "${GITHUB_EVENT_PATH}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GITHUB_EVENT_PATH]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GITHUB_EVENT_PATH}]${NC}" - exit 1 + error "Failed to get [GITHUB_EVENT_PATH]!" + fatal "[${GITHUB_EVENT_PATH}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_EVENT_PATH]${F[B]}, value:${F[W]}[${GITHUB_EVENT_PATH}]${F[B]}${NC}" + info "Successfully found:${F[W]}[GITHUB_EVENT_PATH]${F[B]}, value:${F[W]}[${GITHUB_EVENT_PATH}]${F[B]}" fi ################################################## @@ -698,11 +895,10 @@ GetGitHubVars() { # Validate we have a value # ############################ if [ -z "${GITHUB_ORG}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GITHUB_ORG]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GITHUB_ORG}]${NC}" - exit 1 + error "Failed to get [GITHUB_ORG]!" + fatal "[${GITHUB_ORG}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_ORG]${F[B]}, value:${F[W]}[${GITHUB_ORG}]${NC}" + info "Successfully found:${F[W]}[GITHUB_ORG]${F[B]}, value:${F[W]}[${GITHUB_ORG}]" fi ####################### @@ -714,28 +910,27 @@ GetGitHubVars() { # Validate we have a value # ############################ if [ -z "${GITHUB_REPO}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GITHUB_REPO]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GITHUB_REPO}]${NC}" - exit 1 + error "Failed to get [GITHUB_REPO]!" + fatal "[${GITHUB_REPO}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_REPO]${F[B]}, value:${F[W]}[${GITHUB_REPO}]${NC}" + info "Successfully found:${F[W]}[GITHUB_REPO]${F[B]}, value:${F[W]}[${GITHUB_REPO}]" fi fi ############################ # Validate we have a value # ############################ - if [ -z "${GITHUB_TOKEN}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GITHUB_TOKEN]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GITHUB_TOKEN}]${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Please set a [GITHUB_TOKEN] from the main workflow environment to take advantage of multiple status reports!${NC}" + if [ -z "${GITHUB_TOKEN}" ] && [[ ${RUN_LOCAL} == "false" ]]; then + error "Failed to get [GITHUB_TOKEN]!" + error "[${GITHUB_TOKEN}]" + error "Please set a [GITHUB_TOKEN] from the main workflow environment to take advantage of multiple status reports!" ################################################################################ # Need to set MULTI_STATUS to false as we cant hit API endpoints without token # ################################################################################ MULTI_STATUS='false' else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_TOKEN]${NC}" + info "Successfully found:${F[W]}[GITHUB_TOKEN]" fi ############################### @@ -751,22 +946,20 @@ GetGitHubVars() { # Validate we have a value # ############################ if [ -z "${GITHUB_REPOSITORY}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GITHUB_REPOSITORY]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GITHUB_REPOSITORY}]${NC}" - exit 1 + error "Failed to get [GITHUB_REPOSITORY]!" + fatal "[${GITHUB_REPOSITORY}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_REPOSITORY]${F[B]}, value:${F[W]}[${GITHUB_REPOSITORY}]${NC}" + info "Successfully found:${F[W]}[GITHUB_REPOSITORY]${F[B]}, value:${F[W]}[${GITHUB_REPOSITORY}]" fi ############################ # Validate we have a value # ############################ if [ -z "${GITHUB_RUN_ID}" ]; then - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to get [GITHUB_RUN_ID]!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${GITHUB_RUN_ID}]${NC}" - exit 1 + error "Failed to get [GITHUB_RUN_ID]!" + fatal "[${GITHUB_RUN_ID}]" else - echo -e "${NC}${F[B]}Successfully found:${F[W]}[GITHUB_RUN_ID]${F[B]}, value:${F[W]}[${GITHUB_RUN_ID}]${NC}" + info "Successfully found:${F[W]}[GITHUB_RUN_ID]${F[B]}, value:${F[W]}[${GITHUB_RUN_ID}]" fi fi } @@ -778,16 +971,14 @@ function ValidatePowershellModules() { if [[ ${VALIDATE_PSSA_MODULE} == "PSScriptAnalyzer" ]]; then VALIDATE_PSSA_CMD=$(pwsh -c "(Get-Command Invoke-ScriptAnalyzer | Select-Object -First 1).Name" 2>&1) else - # Failed to find module - exit 1 + fatal "Failed to find module." fi ######################################### # validate we found the script analyzer # ######################################### if [[ ${VALIDATE_PSSA_CMD} != "Invoke-ScriptAnalyzer" ]]; then - # Failed to find module - exit 1 + fatal "Failed to find module." fi ####################### @@ -800,15 +991,12 @@ function ValidatePowershellModules() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # Failed - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed find module [PSScriptAnalyzer] for [${LINTER_NAME}] in system!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[PSSA_MODULE ${VALIDATE_PSSA_MODULE}] [PSSA_CMD ${VALIDATE_PSSA_CMD}]${NC}" - exit 1 + error "Failed find module [PSScriptAnalyzer] for [${LINTER_NAME}] in system!" + fatal "[PSSA_MODULE ${VALIDATE_PSSA_MODULE}] [PSSA_CMD ${VALIDATE_PSSA_CMD}]" else # Success - if [[ ${ACTIONS_RUNNER_DEBUG} == "true" ]]; then - echo -e "${NC}${F[B]}Successfully found module ${F[W]}[${VALIDATE_PSSA_MODULE}]${F[B]} in system${NC}" - echo -e "${NC}${F[B]}Successfully found command ${F[W]}[${VALIDATE_PSSA_CMD}]${F[B]} in system${NC}" - fi + debug "Successfully found module ${F[W]}[${VALIDATE_PSSA_MODULE}]${F[B]} in system" + debug "Successfully found command ${F[W]}[${VALIDATE_PSSA_CMD}]${F[B]} in system" fi } ################################################################################ @@ -817,11 +1005,11 @@ CallStatusAPI() { #################### # Pull in the vars # #################### - LANGUAGE="${1}" # langauge that was validated - STATUS="${2}" # success | error + LANGUAGE="${1}" # langauge that was validated + STATUS="${2}" # success | error SUCCESS_MSG='No errors were found in the linting process' FAIL_MSG='Errors were detected, please view logs' - MESSAGE='' # Message to send to status API + MESSAGE='' # Message to send to status API ###################################### # Check the status to create message # @@ -861,30 +1049,45 @@ CallStatusAPI() { ############################## if [ "${ERROR_CODE}" -ne 0 ]; then # ERROR - echo "ERROR! Failed to call GitHub Status API!" - echo "ERROR:[${SEND_STATUS_CMD}]" + info "ERROR! Failed to call GitHub Status API!" + info "ERROR:[${SEND_STATUS_CMD}]" # Not going to fail the script on this yet... fi fi } ################################################################################ -#### Function Footer ########################################################### -Footer() { - echo "" - echo "----------------------------------------------" - echo "----------------------------------------------" - echo "The script has completed" - echo "----------------------------------------------" - echo "----------------------------------------------" - echo "" +#### Function Reports ########################################################## +Reports() { + info "----------------------------------------------" + info "----------------------------------------------" + info "Generated reports:" + info "----------------------------------------------" + info "----------------------------------------------" ################################### # Prints output report if enabled # ################################### - if [ -z "${FORMAT_REPORT}" ] ; then - echo "Reports generated in folder ${REPORT_OUTPUT_FOLDER}" + if [ -z "${FORMAT_REPORT}" ]; then + info "Reports generated in folder ${REPORT_OUTPUT_FOLDER}" fi + ################################ + # Prints for warnings if found # + ################################ + for TEST in "${WARNING_ARRAY_TEST[@]}"; do + warn "Expected file to compare with was not found for ${TEST}" + done + +} +################################################################################ +#### Function Footer ########################################################### +Footer() { + info "----------------------------------------------" + info "----------------------------------------------" + info "The script has completed" + info "----------------------------------------------" + info "----------------------------------------------" + #################################################### # Need to clean up the lanuage array of duplicates # #################################################### @@ -902,44 +1105,38 @@ Footer() { ################## # Print if not 0 # ################## - if [ "${!ERROR_COUNTER}" -ne 0 ]; then + if [[ ${!ERROR_COUNTER} -ne 0 ]]; then # We found errors in the language ################### # Print the goods # ################### - echo -e "${NC}${B[R]}${F[W]}ERRORS FOUND${NC} in ${LANGUAGE}:[${!ERROR_COUNTER}]${NC}" + error "ERRORS FOUND${NC} in ${LANGUAGE}:[${!ERROR_COUNTER}]" ######################################### # Create status API for Failed language # ######################################### CallStatusAPI "${LANGUAGE}" "error" - else + ###################################### + # Check if we validated the langauge # + ###################################### + elif [[ ${!ERROR_COUNTER} -eq 0 ]] && [[ ${UNIQUE_LINTED_ARRAY[*]} =~ ${LANGUAGE} ]]; then # No errors found when linting the language - ###################################### - # Check if we validated the langauge # - ###################################### - if [[ "${UNIQUE_LINTED_ARRAY[*]}" =~ ${LANGUAGE} ]]; then - CallStatusAPI "${LANGUAGE}" "success" - fi + CallStatusAPI "${LANGUAGE}" "success" fi done - ################################ - # Prints for warnings if found # - ################################ - for TEST in "${WARNING_ARRAY_TEST[@]}"; do - echo -e "${NC}${F[Y]}WARN!${NC} Expected file to compare with was not found for ${TEST}${NC}" - done - ################################## # Exit with 0 if errors disabled # ################################## if [ "${DISABLE_ERRORS}" == "true" ]; then - echo -e "${NC}${F[Y]}WARN!${NC} Exiting with exit code:[0] as:[DISABLE_ERRORS] was set to:[${DISABLE_ERRORS}]${NC}" + warn "Exiting with exit code:[0] as:[DISABLE_ERRORS] was set to:[${DISABLE_ERRORS}]" exit 0 + fi + ############################### # Exit with 1 if errors found # ############################### +<<<<<<< HEAD elif [ "${ERRORS_FOUND_YML}" -ne 0 ] || [ "${ERRORS_FOUND_JSON}" -ne 0 ] || @@ -989,8 +1186,40 @@ Footer() { # Successful exit exit 0 fi +======= + # Loop through all languages + for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do + # build the variable + ERRORS_FOUND_LANGUAGE="ERRORS_FOUND_${LANGUAGE}" + # Check if error was found + if [[ ${!ERRORS_FOUND_LANGUAGE} -ne 0 ]]; then + # Failed exit + fatal "Exiting with errors found!" + fi + done + + ######################## + # Footer prints Exit 0 # + ######################## + notice "All file(s) linted successfully with no errors detected" + info "----------------------------------------------" + # Successful exit + exit 0 } +################################################################################ +#### Function Cleanup ########################################################## +cleanup() { + local -ri EXIT_CODE=$? + + sh -c "cat ${LOG_TEMP} >> ${GITHUB_WORKSPACE}/${LOG_FILE}" || true + + exit ${EXIT_CODE} + trap - 0 1 2 3 6 14 15 +>>>>>>> master +} +trap 'cleanup' 0 1 2 3 6 14 15 + ################################################################################ ############################### MAIN ########################################### ################################################################################ @@ -1004,10 +1233,9 @@ Header # check flag for validating the report folder does not exist # ############################################################## if [ -n "${OUTPUT_FORMAT}" ]; then - if [ -d "${REPORT_OUTPUT_FOLDER}" ] ; then - echo "ERROR! Found ${REPORT_OUTPUT_FOLDER}" - echo "Please remove the folder and try again." - exit 1 + if [ -d "${REPORT_OUTPUT_FOLDER}" ]; then + error "ERROR! Found ${REPORT_OUTPUT_FOLDER}" + fatal "Please remove the folder and try again." fi fi @@ -1026,50 +1254,51 @@ GetValidationInfo ######################## # Get the linter rules # ######################## -# Get YML rules -GetLinterRules "YAML" -# Get Markdown rules -GetLinterRules "MARKDOWN" -# Get Python rules -GetLinterRules "PYTHON" -# Get Ruby rules -GetLinterRules "RUBY" -# Get Coffeescript rules -GetLinterRules "COFFEESCRIPT" # Get Ansible rules GetLinterRules "ANSIBLE" -# Get JavaScript rules -GetLinterRules "JAVASCRIPT" -# Get TypeScript rules -GetLinterRules "TYPESCRIPT" -# Get Golang rules -GetLinterRules "GO" -# Get Docker rules -GetLinterRules "DOCKER" -# Get Terraform rules -GetLinterRules "TERRAFORM" -# Get PowerShell rules -GetLinterRules "POWERSHELL" # Get ARM rules GetLinterRules "ARM" +# Get CLOUDFORMATION rules +GetLinterRules "CLOUDFORMATION" +# Get Coffeescript rules +GetLinterRules "COFFEESCRIPT" # Get CSS rules GetLinterRules "CSS" -# Get CFN rules -GetLinterRules "CFN" # Get DART rules GetLinterRules "DART" +# Get Docker rules +GetLinterRules "DOCKER" +# Get Golang rules +GetLinterRules "GO" +# Get Groovy rules +GetLinterRules "GROOVY" # Get HTML rules GetLinterRules "HTML" +# Get JavaScript rules +GetLinterRules "JAVASCRIPT" +# Get LUA rules +GetLinterRules "LUA" +# Get Markdown rules +GetLinterRules "MARKDOWN" +# Get PowerShell rules +GetLinterRules "POWERSHELL" +# Get Python pylint rules +GetLinterRules "PYTHON_PYLINT" +# Get Python flake8 rules +GetLinterRules "PYTHON_FLAKE8" +# Get Ruby rules +GetLinterRules "RUBY" +# Get Terraform rules +GetLinterRules "TERRAFORM" +# Get TypeScript rules +GetLinterRules "TYPESCRIPT" +# Get YAML rules +GetLinterRules "YAML" -################################# -# Check if were in verbose mode # -################################# -if [[ ${ACTIONS_RUNNER_DEBUG} == "true" ]]; then - ################################## - # Get and print all version info # - ################################## - GetLinterVersions -fi +################################## +# Get and print all version info # +################################## +GetLinterVersions ########################################### # Check to see if this is a test case run # @@ -1098,48 +1327,48 @@ if [ "${VALIDATE_ALL_CODEBASE}" == "false" ]; then BuildFileList fi -############### -# YML LINTING # -############### -if [ "${VALIDATE_YAML}" == "true" ]; then - ###################### - # Lint the Yml Files # - ###################### - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "YML" "yamllint" "yamllint -c ${YAML_LINTER_RULES}" ".*\.\(yml\|yaml\)\$" "${FILE_ARRAY_YML[@]}" +################### +# ANSIBLE LINTING # +################### +if [ "${VALIDATE_ANSIBLE}" == "true" ]; then + ########################## + # Lint the Ansible files # + ########################## + # Due to the nature of how we want to validate Ansible, we cannot use the + # standard loop, since it looks for an ansible folder, excludes certain + # files, and looks for additional changes, it should be an outlier + LintAnsibleFiles "${ANSIBLE_LINTER_RULES}" # Passing rules but not needed, dont want to exclude unused var fi -################ -# JSON LINTING # -################ -if [ "${VALIDATE_JSON}" == "true" ]; then - ####################### - # Lint the json files # - ####################### - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "${FILE_ARRAY_JSON[@]}" -fi +######################## +# ARM Template LINTING # +######################## +if [ "${VALIDATE_ARM}" == "true" ]; then + # If we are validating all codebase we need to build file list because not every json file is an ARM file + if [ "${VALIDATE_ALL_CODEBASE}" == "true" ]; then + ############################################################################### + # Set the file seperator to newline to allow for grabbing objects with spaces # + ############################################################################### + IFS=$'\n' -############### -# XML LINTING # -############### -if [ "${VALIDATE_XML}" == "true" ]; then - ###################### - # Lint the XML Files # - ###################### - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "XML" "xmllint" "xmllint" ".*\.\(xml\)\$" "${FILE_ARRAY_XML[@]}" -fi + mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -type f -regex ".*\.\(json\)\$" 2>&1) + for FILE in "${LIST_FILES[@]}"; do + if DetectARMFile "${FILE}"; then + FILE_ARRAY_ARM+=("${FILE}") + fi + done -#################### -# MARKDOWN LINTING # -#################### -if [ "${VALIDATE_MARKDOWN}" == "true" ]; then - ########################### - # Lint the Markdown Files # - ########################### + ########################### + # Set IFS back to default # + ########################### + IFS="${DEFAULT_IFS}" + fi + + ############################### + # Lint the ARM Template files # + ############################### # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "MARKDOWN" "markdownlint" "markdownlint -c ${MARKDOWN_LINTER_RULES}" ".*\.\(md\)\$" "${FILE_ARRAY_MARKDOWN[@]}" + LintCodebase "ARM" "arm-ttk" "Import-Module ${ARM_TTK_PSD1} ; \${config} = \$(Import-PowerShellDataFile -Path ${ARM_LINTER_RULES}) ; Test-AzTemplate @config -TemplatePath" "disabledfileext" "${FILE_ARRAY_ARM[@]}" fi ################ @@ -1153,74 +1382,49 @@ if [ "${VALIDATE_BASH}" == "true" ]; then LintCodebase "BASH" "shellcheck" "shellcheck --color" ".*\.\(sh\|bash\|dash\|ksh\)\$" "${FILE_ARRAY_BASH[@]}" fi -################## -# PYTHON LINTING # -################## -if [ "${VALIDATE_PYTHON}" == "true" ]; then - ######################### - # Lint the python files # - ######################### - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "PYTHON" "pylint" "pylint --rcfile ${PYTHON_LINTER_RULES}" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON[@]}" -fi +########################## +# CLOUDFORMATION LINTING # +########################## +if [ "${VALIDATE_CLOUDFORMATION}" == "true" ]; then + # If we are validating all codebase we need to build file list because not every yml/json file is an CLOUDFORMATION file + if [ "${VALIDATE_ALL_CODEBASE}" == "true" ]; then + ############################################################################### + # Set the file seperator to newline to allow for grabbing objects with spaces # + ############################################################################### + IFS=$'\n' + + mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -type f -regex ".*\.\(yml\|yaml\|json\)\$" 2>&1) + for FILE in "${LIST_FILES[@]}"; do + if DetectCloudFormationFile "${FILE}"; then + FILE_ARRAY_CLOUDFORMATION+=("${FILE}") + fi + done + + ########################### + # Set IFS back to default # + ########################### + IFS="${DEFAULT_IFS}" + fi -############### -# CFN LINTING # -############### -if [ "${VALIDATE_CFN}" == "true" ]; then ################################# # Lint the CloudFormation files # ################################# # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "CFN" "cfn-lint" "cfn-lint --config-file ${CFN_LINTER_RULES}" ".*\.\(json\|yml\|yaml\)\$" "${FILE_ARRAY_CFN[@]}" + LintCodebase "CLOUDFORMATION" "cfn-lint" "cfn-lint --config-file ${CLOUDFORMATION_LINTER_RULES}" "disabledfileext" "${FILE_ARRAY_CLOUDFORMATION[@]}" fi -################ -# PERL LINTING # -################ -if [ "${VALIDATE_PERL}" == "true" ]; then - ####################### - # Lint the perl files # - ####################### - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "PERL" "perl" "perl -Mstrict -cw" ".*\.\(pl\)\$" "${FILE_ARRAY_PERL[@]}" -fi - -################ -# RAKU LINTING # -################ -if [ "${VALIDATE_RAKU}" == "true" ]; then - ####################### - # Lint the raku files # - ####################### - echo "${GITHUB_WORKSPACE}/META6.json" - if [ -e "${GITHUB_WORKSPACE}/META6.json" ]; then - cd "${GITHUB_WORKSPACE}" && zef install --deps-only --/test . - fi - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "RAKU" "raku" "raku -I ${GITHUB_WORKSPACE}/lib -c" ".*\.\(raku\|rakumod\|rakutest\|pm6\|pl6\|p6\)\$" "${FILE_ARRAY_RAKU[@]}" -fi - -################ -# PHP LINTING # -################ -if [ "${VALIDATE_PHP}" == "true" ]; then - ####################### - # Lint the PHP files # - ####################### - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "PHP" "php" "php -l" ".*\.\(php\)\$" "${FILE_ARRAY_PHP[@]}" -fi - -################ -# RUBY LINTING # -################ -if [ "${VALIDATE_RUBY}" == "true" ]; then - ####################### - # Lint the ruby files # - ####################### - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES} --force-exclusion" ".*\.\(rb\)\$" "${FILE_ARRAY_RUBY[@]}" +################### +# CLOJURE LINTING # +################### +if [ "${VALIDATE_CLOJURE}" == "true" ]; then + ################################# + # Get Clojure standard rules # + ################################# + GetStandardRules "clj-kondo" + ######################### + # Lint the Clojure files # + ######################### + LintCodebase "CLOJURE" "clj-kondo" "clj-kondo --config ${CLOJURE_LINTER_RULES} --lint" ".*\.\(clj\|cljs\|cljc\|edn\)\$" "${FILE_ARRAY_CLOJURE[@]}" fi ######################## @@ -1234,6 +1438,65 @@ if [ "${VALIDATE_COFFEE}" == "true" ]; then LintCodebase "COFFEESCRIPT" "coffeelint" "coffeelint -f ${COFFEESCRIPT_LINTER_RULES}" ".*\.\(coffee\)\$" "${FILE_ARRAY_COFFEESCRIPT[@]}" fi +############### +# CSS LINTING # +############### +if [ "${VALIDATE_CSS}" == "true" ]; then + ################################# + # Get CSS standard rules # + ################################# + GetStandardRules "stylelint" + ############################# + # Lint the CSS files # + ############################# + LintCodebase "CSS" "stylelint" "stylelint --config ${CSS_LINTER_RULES}" ".*\.\(css\)\$" "${FILE_ARRAY_CSS[@]}" +fi + +################ +# DART LINTING # +################ +if [ "${VALIDATE_DART}" == "true" ]; then + ####################### + # Lint the Dart files # + ####################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "DART" "dart" "dartanalyzer --fatal-infos --fatal-warnings --options ${DART_LINTER_RULES}" ".*\.\(dart\)\$" "${FILE_ARRAY_DART[@]}" +fi + +################## +# DOCKER LINTING # +################## +if [ "${VALIDATE_DOCKER}" == "true" ]; then + ######################### + # Lint the docker files # + ######################### + # 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" "dockerfilelint -c $(dirname ${DOCKER_LINTER_RULES})" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKER[@]}" +fi + +######################## +# EDITORCONFIG LINTING # +######################## +if [ "${VALIDATE_EDITORCONFIG}" == "true" ]; then + #################################### + # Lint the files with editorconfig # + #################################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "EDITORCONFIG" "editorconfig-checker" "editorconfig-checker" "^.*$" "${FILE_ARRAY_ENV[@]}" +fi + +############### +# ENV LINTING # +############### +if [ "${VALIDATE_ENV}" == "true" ]; then + ####################### + # Lint the env files # + ####################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\).*\$" "${FILE_ARRAY_ENV[@]}" +fi + ################## # GOLANG LINTING # ################## @@ -1245,28 +1508,29 @@ if [ "${VALIDATE_GO}" == "true" ]; then LintCodebase "GO" "golangci-lint" "golangci-lint run -c ${GO_LINTER_RULES}" ".*\.\(go\)\$" "${FILE_ARRAY_GO[@]}" fi -##################### -# TERRAFORM LINTING # -##################### -if [ "${VALIDATE_TERRAFORM}" == "true" ]; then - ############################ - # Lint the Terraform files # - ############################ +################## +# GROOVY LINTING # +################## +if [ "$VALIDATE_GROOVY" == "true" ]; then + ######################### + # Lint the groovy files # + ######################### # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "TERRAFORM" "tflint" "tflint -c ${TERRAFORM_LINTER_RULES}" ".*\.\(tf\)\$" "${FILE_ARRAY_TERRAFORM[@]}" + LintCodebase "GROOVY" "npm-groovy-lint" "npm-groovy-lint -c $GROOVY_LINTER_RULES --failon error" ".*\.\(groovy\|jenkinsfile\|gradle\)\$" "${FILE_ARRAY_GROOVY[@]}" fi -################### -# ANSIBLE LINTING # -################### -if [ "${VALIDATE_ANSIBLE}" == "true" ]; then - ########################## - # Lint the Ansible files # - ########################## - # Due to the nature of how we want to validate Ansible, we cannot use the - # standard loop, since it looks for an ansible folder, excludes certain - # files, and looks for additional changes, it should be an outlier - LintAnsibleFiles "${ANSIBLE_LINTER_RULES}" # Passing rules but not needed, dont want to exclude unused var +################ +# HTML LINTING # +################ +if [ "${VALIDATE_HTML}" == "true" ]; then + ########################### + # Get HTML standard rules # + ########################### + GetStandardRules "htmlhint" + ####################### + # Lint the HTML files # + ####################### + LintCodebase "HTML" "htmlhint" "htmlhint --config ${HTML_LINTER_RULES}" ".*\.\(html\)\$" "${FILE_ARRAY_HTML[@]}" fi ###################### @@ -1295,76 +1559,28 @@ if [ "${VALIDATE_JAVASCRIPT_STANDARD}" == "true" ]; then LintCodebase "JAVASCRIPT_STANDARD" "standard" "standard ${JAVASCRIPT_STANDARD_LINTER_RULES}" ".*\.\(js\)\$" "${FILE_ARRAY_JAVASCRIPT_STANDARD[@]}" fi -###################### -# JSX LINTING # -###################### +################ +# JSON LINTING # +################ +if [ "${VALIDATE_JSON}" == "true" ]; then + ####################### + # Lint the json files # + ####################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "${FILE_ARRAY_JSON[@]}" +fi + +############### +# JSX LINTING # +############### if [ "${VALIDATE_JSX}" == "true" ]; then - ############################# - # Lint the JSX files # - ############################# + ###################### + # Lint the JSX files # + ###################### # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" LintCodebase "JSX" "eslint" "eslint --no-eslintrc -c ${JAVASCRIPT_LINTER_RULES}" ".*\.\(jsx\)\$" "${FILE_ARRAY_JSX[@]}" fi -###################### -# TSX LINTING # -###################### -if [ "${VALIDATE_TSX}" == "true" ]; then - ############################# - # Lint the TSX files # - ############################# - LintCodebase "TSX" "eslint" "eslint --no-eslintrc -c ${TYPESCRIPT_LINTER_RULES}" ".*\.\(tsx\)\$" "${FILE_ARRAY_TSX[@]}" -fi - -###################### -# TYPESCRIPT LINTING # -###################### -if [ "${VALIDATE_TYPESCRIPT_ES}" == "true" ]; then - ############################# - # Lint the Typescript files # - ############################# - LintCodebase "TYPESCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${TYPESCRIPT_LINTER_RULES}" ".*\.\(ts\)\$" "${FILE_ARRAY_TYPESCRIPT_ES[@]}" -fi - -###################### -# TYPESCRIPT LINTING # -###################### -if [ "${VALIDATE_TYPESCRIPT_STANDARD}" == "true" ]; then - ################################# - # Get Typescript standard rules # - ################################# - GetStandardRules "typescript" - ############################# - # Lint the Typescript files # - ############################# - LintCodebase "TYPESCRIPT_STANDARD" "standard" "standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin ${TYPESCRIPT_STANDARD_LINTER_RULES}" ".*\.\(ts\)\$" "${FILE_ARRAY_TYPESCRIPT_STANDARD[@]}" -fi - -############### -# CSS LINTING # -############### -if [ "${VALIDATE_CSS}" == "true" ]; then - ################################# - # Get CSS standard rules # - ################################# - GetStandardRules "stylelint" - ############################# - # Lint the CSS files # - ############################# - LintCodebase "CSS" "stylelint" "stylelint --config ${CSS_LINTER_RULES}" ".*\.\(css\)\$" "${FILE_ARRAY_CSS[@]}" -fi - -############### -# ENV LINTING # -############### -if [ "${VALIDATE_ENV}" == "true" ]; then - ####################### - # Lint the env files # - ####################### - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\).*\$" "${FILE_ARRAY_ENV[@]}" -fi - ################ # JAVA LINTING # ################ @@ -1387,90 +1603,26 @@ if [ "${VALIDATE_KOTLIN}" == "true" ]; then LintCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "${FILE_ARRAY_KOTLIN[@]}" fi -######################## -# EDITORCONFIG LINTING # -######################## -if [ "${VALIDATE_EDITORCONFIG}" == "true" ]; then - #################################### - # Lint the files with editorconfig # - #################################### +############### +# LUA LINTING # +############### +if [ "${VALIDATE_LUA}" == "true" ]; then + ###################### + # Lint the Lua files # + ###################### # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "EDITORCONFIG" "editorconfig-checker" "editorconfig-checker" "^.*$" "${FILE_ARRAY_ENV[@]}" + LintCodebase "LUA" "lua" "luacheck --config ${LUA_LINTER_RULES}" ".*\.\(lua\)\$" "${FILE_ARRAY_LUA[@]}" fi -################## -# DART LINTING # -################## -if [ "${VALIDATE_DART}" == "true" ]; then - ####################### - # Lint the Dart files # - ####################### +#################### +# MARKDOWN LINTING # +#################### +if [ "${VALIDATE_MARKDOWN}" == "true" ]; then + ########################### + # Lint the Markdown Files # + ########################### # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "DART" "dart" "pub get || true && dartanalyzer --fatal-infos --fatal-warnings --options ${DART_LINTER_RULES}" ".*\.\(dart\)\$" "${FILE_ARRAY_DART[@]}" -fi - -################## -# DOCKER LINTING # -################## -if [ "${VALIDATE_DOCKER}" == "true" ]; then - ######################### - # Lint the docker files # - ######################### - # 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" "dockerfilelint -c $(dirname ${DOCKER_LINTER_RULES})" ".*\(Dockerfile\)\$" "${FILE_ARRAY_DOCKER[@]}" -fi - -################### -# CLOJURE LINTING # -################### -if [ "${VALIDATE_CLOJURE}" == "true" ]; then - ################################# - # Get Clojure standard rules # - ################################# - GetStandardRules "clj-kondo" - ######################### - # Lint the Clojure files # - ######################### - LintCodebase "CLOJURE" "clj-kondo" "clj-kondo --config ${CLOJURE_LINTER_RULES} --lint" ".*\.\(clj\|cljs\|cljc\|edn\)\$" "${FILE_ARRAY_CLOJURE[@]}" -fi - -################## -# PROTOBUF LINTING # -################## -if [ "${VALIDATE_PROTOBUF}" == "true" ]; then - ####################### - # Lint the Protocol Buffers files # - ####################### - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "PROTOBUF" "protolint" "protolint lint --config_path ${PROTOBUF_LINTER_RULES}" ".*\.\(proto\)\$" "${FILE_ARRAY_PROTOBUF[@]}" -fi - -###################### -# POWERSHELL LINTING # -###################### -if [ "${VALIDATE_POWERSHELL}" == "true" ]; then - ############################################################### - # For POWERSHELL, ensure PSScriptAnalyzer module is available # - ############################################################### - ValidatePowershellModules - - ############################# - # Lint the powershell files # - ############################# - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "POWERSHELL" "pwsh" "Invoke-ScriptAnalyzer -EnableExit -Settings ${POWERSHELL_LINTER_RULES} -Path" ".*\.\(ps1\|psm1\|psd1\|ps1xml\|pssc\|psrc\|cdxml\)\$" "${FILE_ARRAY_POWERSHELL[@]}" -fi - -######################## -# ARM Template LINTING # -######################## -if [ "${VALIDATE_ARM}" == "true" ]; then - ############################### - # Lint the ARM Template files # - ############################### - # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "ARM" "arm-ttk" "Import-Module ${ARM_TTK_PSD1} ; \${config} = \$(Import-PowerShellDataFile -Path ${ARM_LINTER_RULES}) ; Test-AzTemplate @config -TemplatePath" ".*\.\(json\)\$" "${FILE_ARRAY_ARM[@]}" + LintCodebase "MARKDOWN" "markdownlint" "markdownlint -c ${MARKDOWN_LINTER_RULES}" ".*\.\(md\)\$" "${FILE_ARRAY_MARKDOWN[@]}" fi ################### @@ -1505,19 +1657,239 @@ if [ "${VALIDATE_OPENAPI}" == "true" ]; then fi ################ -# HTML LINTING # +# PERL LINTING # ################ -if [ "${VALIDATE_HTML}" == "true" ]; then - ################################# - # Get HTML standard rules # - ################################# - GetStandardRules "htmlhint" - ############################# - # Lint the HTML files # - ############################# - LintCodebase "HTML" "htmlhint" "htmlhint --config ${HTML_LINTER_RULES}" ".*\.\(html\)\$" "${FILE_ARRAY_HTML[@]}" +if [ "${VALIDATE_PERL}" == "true" ]; then + ####################### + # Lint the perl files # + ####################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "PERL" "perl" "perl -Mstrict -cw" ".*\.\(pl\)\$" "${FILE_ARRAY_PERL[@]}" fi +################ +# PHP LINTING # +################ +if [ "${VALIDATE_PHP_BUILTIN}" == "true" ]; then + ################################################ + # Lint the PHP files using built-in PHP linter # + ################################################ + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "PHP_BUILTIN" "php" "php -l" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_BUILTIN[@]}" +fi + +if [ "${VALIDATE_PHP_PHPCS}" == "true" ]; then + ############################################ + # Lint the PHP files using PHP CodeSniffer # + ############################################ + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "PHP_PHPCS" "phpcs" "phpcs --standard=${PHP_PHPCS_LINTER_RULES}" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_PHPCS[@]}" +fi + +if [ "${VALIDATE_PHP_PHPSTAN}" == "true" ]; then + ####################### + # Lint the PHP files using PHPStan # + ####################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "PHP_PHPSTAN" "phpstan" "phpstan analyse --no-progress --no-ansi -c ${PHP_PHPSTAN_LINTER_RULES}" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_PHPSTAN[@]}" +fi + +if [ "${VALIDATE_PHP_PSALM}" == "true" ]; then + ################################## + # Lint the PHP files using Psalm # + ################################## + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "PHP_PSALM" "psalm" "psalm --config=${PHP_PSALM_LINTER_RULES}" ".*\.\(php\)\$" "${FILE_ARRAY_PHP_PSALM[@]}" +fi + +###################### +# POWERSHELL LINTING # +###################### +if [ "${VALIDATE_POWERSHELL}" == "true" ]; then + ############################################################### + # For POWERSHELL, ensure PSScriptAnalyzer module is available # + ############################################################### + ValidatePowershellModules + + ############################# + # Lint the powershell files # + ############################# + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "POWERSHELL" "pwsh" "Invoke-ScriptAnalyzer -EnableExit -Settings ${POWERSHELL_LINTER_RULES} -Path" ".*\.\(ps1\|psm1\|psd1\|ps1xml\|pssc\|psrc\|cdxml\)\$" "${FILE_ARRAY_POWERSHELL[@]}" +fi + +#################### +# PROTOBUF LINTING # +#################### +if [ "${VALIDATE_PROTOBUF}" == "true" ]; then + ####################### + # Lint the Protocol Buffers files # + ####################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "PROTOBUF" "protolint" "protolint lint --config_path ${PROTOBUF_LINTER_RULES}" ".*\.\(proto\)\$" "${FILE_ARRAY_PROTOBUF[@]}" +fi + +################## +# PYTHON LINTING # +################## +if [ "${VALIDATE_PYTHON_PYLINT}" == "true" ]; then + ######################### + # Lint the python files # + ######################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "PYTHON_PYLINT" "pylint" "pylint --rcfile ${PYTHON_PYLINT_LINTER_RULES}" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON_PYLINT[@]}" +fi + +################## +# PYTHON LINTING # +################## +if [ "${VALIDATE_PYTHON_FLAKE8}" == "true" ]; then + ######################### + # Lint the python files # + ######################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "PYTHON_FLAKE8" "flake8" "flake8 --config=${PYTHON_FLAKE8_LINTER_RULES}" ".*\.\(py\)\$" "${FILE_ARRAY_PYTHON_FLAKE8[@]}" +fi + +################ +# RAKU LINTING # +################ +if [ "${VALIDATE_RAKU}" == "true" ]; then + ####################### + # Lint the raku files # + ####################### + info "${GITHUB_WORKSPACE}/META6.json" + if [ -e "${GITHUB_WORKSPACE}/META6.json" ]; then + cd "${GITHUB_WORKSPACE}" && zef install --deps-only --/test . + fi + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "RAKU" "raku" "raku -I ${GITHUB_WORKSPACE}/lib -c" ".*\.\(raku\|rakumod\|rakutest\|pm6\|pl6\|p6\)\$" "${FILE_ARRAY_RAKU[@]}" +fi + +################ +# RUBY LINTING # +################ +if [ "${VALIDATE_RUBY}" == "true" ]; then + ####################### + # Lint the ruby files # + ####################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES} --force-exclusion" ".*\.\(rb\)\$" "${FILE_ARRAY_RUBY[@]}" +fi + +###################### +# AWS STATES LINTING # +###################### +if [ "${VALIDATE_STATES}" == "true" ]; then + # If we are validating all codebase we need to build file list because not every json file is an aws states file + if [ "${VALIDATE_ALL_CODEBASE}" == "true" ]; then + ############################################################################### + # Set the file seperator to newline to allow for grabbing objects with spaces # + ############################################################################### + IFS=$'\n' + + mapfile -t LIST_FILES < <(find "${GITHUB_WORKSPACE}" -type f -regex ".*\.\(json\)\$" 2>&1) + for FILE in "${LIST_FILES[@]}"; do + if DetectAWSStatesFIle "${FILE}"; then + FILE_ARRAY_STATES+=("${FILE}") + fi + done + + ########################### + # Set IFS back to default # + ########################### + IFS="${DEFAULT_IFS}" + fi + + ######################### + # Lint the STATES files # + ######################### + LintCodebase "STATES" "asl-validator" "asl-validator --json-path" "disabledfileext" "${FILE_ARRAY_STATES[@]}" +fi + +##################### +# TERRAFORM LINTING # +##################### +if [ "${VALIDATE_TERRAFORM}" == "true" ]; then + ############################ + # Lint the Terraform files # + ############################ + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "TERRAFORM" "tflint" "tflint -c ${TERRAFORM_LINTER_RULES}" ".*\.\(tf\)\$" "${FILE_ARRAY_TERRAFORM[@]}" +fi + +############################### +# TERRAFORM TERRASCAN LINTING # +############################### +if [ "${VALIDATE_TERRAFORM_TERRASCAN}" == "true" ]; then + ############################ + # Lint the Terraform files # + ############################ + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "TERRAFORM_TERRASCAN" "terrascan" "terrascan -f " ".*\.\(tf\)\$" "${FILE_ARRAY_TERRAFORM_TERRASCAN[@]}" +fi + +############### +# TSX LINTING # +############### +if [ "${VALIDATE_TSX}" == "true" ]; then + ###################### + # Lint the TSX files # + ###################### + LintCodebase "TSX" "eslint" "eslint --no-eslintrc -c ${TYPESCRIPT_LINTER_RULES}" ".*\.\(tsx\)\$" "${FILE_ARRAY_TSX[@]}" +fi + +###################### +# TYPESCRIPT LINTING # +###################### +if [ "${VALIDATE_TYPESCRIPT_ES}" == "true" ]; then + ############################# + # Lint the Typescript files # + ############################# + LintCodebase "TYPESCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${TYPESCRIPT_LINTER_RULES}" ".*\.\(ts\)\$" "${FILE_ARRAY_TYPESCRIPT_ES[@]}" +fi + +###################### +# TYPESCRIPT LINTING # +###################### +if [ "${VALIDATE_TYPESCRIPT_STANDARD}" == "true" ]; then + ################################# + # Get Typescript standard rules # + ################################# + GetStandardRules "typescript" + ############################# + # Lint the Typescript files # + ############################# + LintCodebase "TYPESCRIPT_STANDARD" "standard" "standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin ${TYPESCRIPT_STANDARD_LINTER_RULES}" ".*\.\(ts\)\$" "${FILE_ARRAY_TYPESCRIPT_STANDARD[@]}" +fi + +############### +# XML LINTING # +############### +if [ "${VALIDATE_XML}" == "true" ]; then + ###################### + # Lint the XML Files # + ###################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "XML" "xmllint" "xmllint" ".*\.\(xml\)\$" "${FILE_ARRAY_XML[@]}" +fi + +############### +# YAML LINTING # +############### +if [ "${VALIDATE_YAML}" == "true" ]; then + ###################### + # Lint the Yml Files # + ###################### + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "YAML" "yamllint" "yamllint -c ${YAML_LINTER_RULES}" ".*\.\(yml\|yaml\)\$" "${FILE_ARRAY_YAML[@]}" +fi + +########### +# Reports # +########### +Reports + ########## # Footer # ########## diff --git a/lib/log.sh b/lib/log.sh new file mode 100644 index 00000000..a7ab55d9 --- /dev/null +++ b/lib/log.sh @@ -0,0 +1,53 @@ +#!/usr/bin/env bash + +declare -Agr B=( + [B]=$(echo -e "\e[44m") + [C]=$(echo -e "\e[46m") + [G]=$(echo -e "\e[42m") + [K]=$(echo -e "\e[40m") + [M]=$(echo -e "\e[45m") + [R]=$(echo -e "\e[41m") + [W]=$(echo -e "\e[47m") + [Y]=$(echo -e "\e[43m") +) +declare -Agr F=( + [B]=$(echo -e "\e[0;34m") + [C]=$(echo -e "\e[0;36m") + [G]=$(echo -e "\e[0;32m") + [K]=$(echo -e "\e[0;30m") + [M]=$(echo -e "\e[0;35m") + [R]=$(echo -e "\e[0;31m") + [W]=$(echo -e "\e[0;37m") + [Y]=$(echo -e "\e[0;33m") +) +readonly NC=$(echo -e "\e[0m") + +export B +export F +export NC + +# Log Functions +LOG_TEMP=$(mktemp) || echo "Failed to create temporary log file." +export LOG_TEMP +echo "super-linter Log" > "${LOG_TEMP}" +log() { + local TOTERM=${1:-} + local MESSAGE=${2:-} + echo -e "${MESSAGE:-}" | ( + if [[ -n ${TOTERM} ]]; then + tee -a "${LOG_TEMP}" >&2 + else + cat >> "${LOG_TEMP}" 2>&1 + fi + ) +} +trace() { log "${LOG_TRACE:-}" "${NC}$(date +"%F %T") ${F[B]}[TRACE ]${NC} $*${NC}"; } +debug() { log "${LOG_DEBUG:-}" "${NC}$(date +"%F %T") ${F[B]}[DEBUG ]${NC} $*${NC}"; } +info() { log "${LOG_VERBOSE:-}" "${NC}$(date +"%F %T") ${F[B]}[INFO ]${NC} $*${NC}"; } +notice() { log "true" "${NC}$(date +"%F %T") ${F[G]}[NOTICE]${NC} $*${NC}"; } +warn() { log "true" "${NC}$(date +"%F %T") ${F[Y]}[WARN ]${NC} $*${NC}"; } +error() { log "true" "${NC}$(date +"%F %T") ${F[R]}[ERROR ]${NC} $*${NC}"; } +fatal() { + log "true" "${NC}$(date +"%F %T") ${B[R]}${F[W]}[FATAL ]${NC} $*${NC}" + exit 1 +} diff --git a/lib/possum.sh b/lib/possum.sh index d867332b..92944cdd 100755 --- a/lib/possum.sh +++ b/lib/possum.sh @@ -8,12 +8,12 @@ cat << EOF @///////@///////////////@@@@ ( @, @/(&/@//////////////////// @ @////////////////////////@@ @ - @%////////(//////////%/////&@ @@ *,@ - @@@@@/@/#/////(&////////////////// .@ - *@@@@@. .%///(//@//////////////////&. .@@, @% - @@% .&@&&/@.@//&/////(////////// @@@@@@@@@ .. &@ - @@% @@@@@ @&/////////////////# @/ V @@/ ,@@@ @ -@@@% @@@@ .%@@@@//////#@ @ @@ @ .,. + @%////////(//////////%/////&@ @@ *,@ ______________ + @@@@@/@/#/////(&////////////////// .@ / \\ + *@@@@@. .%///(//@//////////////////&. .@@, @% / Don't mind me \\ + @@% .&@&&/@.@//&/////(////////// @@@@@@@@@ .. &@ / I'm just looking \\ + @@% @@@@@ @&/////////////////# @/ V @@/ ,@@@ @ < for some trash... | +@@@% @@@@ .%@@@@//////#@ @ @@ @ .,. \\__________________/ @@@/@( (@@@@% @/\ % @@@@( . .@@/\ # @ %@% diff --git a/lib/termColors.sh b/lib/termColors.sh deleted file mode 100755 index 8f22a26c..00000000 --- a/lib/termColors.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -declare -Agr B=( - [B]=$(echo -e "\e[44m") - [C]=$(echo -e "\e[46m") - [G]=$(echo -e "\e[42m") - [K]=$(echo -e "\e[40m") - [M]=$(echo -e "\e[45m") - [R]=$(echo -e "\e[41m") - [W]=$(echo -e "\e[47m") - [Y]=$(echo -e "\e[43m") -) -declare -Agr F=( - [B]=$(echo -e "\e[0;34m") - [C]=$(echo -e "\e[0;36m") - [G]=$(echo -e "\e[0;32m") - [K]=$(echo -e "\e[0;30m") - [M]=$(echo -e "\e[0;35m") - [R]=$(echo -e "\e[0;31m") - [W]=$(echo -e "\e[0;37m") - [Y]=$(echo -e "\e[0;33m") -) -readonly NC=$(echo -e "\e[0m") - -export B -export F -export NC diff --git a/lib/validation.sh b/lib/validation.sh index 326a7a94..6e4105b0 100755 --- a/lib/validation.sh +++ b/lib/validation.sh @@ -13,9 +13,8 @@ function GetValidationInfo() { ############################################ # Print headers for user provided env vars # ############################################ - echo "" - echo "--------------------------------------------" - echo "Gathering user validation information..." + info "--------------------------------------------" + info "Gathering user validation information..." ########################################### # Skip validation if were running locally # @@ -31,10 +30,10 @@ function GetValidationInfo() { if [[ ${VALIDATE_ALL_CODEBASE} != "false" ]]; then # Set to true VALIDATE_ALL_CODEBASE="${DEFAULT_VALIDATE_ALL_CODEBASE}" - echo "- Validating ALL files in code base..." + info "- Validating ALL files in code base..." else # Its false - echo "- Only validating [new], or [edited] files in code base..." + info "- Only validating [new], or [edited] files in code base..." fi fi @@ -46,680 +45,64 @@ function GetValidationInfo() { ################################ # Convert strings to lowercase # ################################ - VALIDATE_ANSIBLE="${VALIDATE_ANSIBLE,,}" - VALIDATE_ARM="${VALIDATE_ARM,,}" - VALIDATE_BASH="${VALIDATE_BASH,,}" - VALIDATE_CLOJURE="${VALIDATE_CLOJURE,,}" - VALIDATE_COFFEE="${VALIDATE_COFFEE,,}" - VALIDATE_CSS="${VALIDATE_CSS,,}" - VALIDATE_DART="${VALIDATE_DART,,}" - VALIDATE_DOCKER="${VALIDATE_DOCKER,,}" - VALIDATE_EDITORCONFIG="${VALIDATE_EDITORCONFIG,,}" - VALIDATE_ENV="${VALIDATE_ENV,,}" - VALIDATE_GO="${VALIDATE_GO,,}" - VALIDATE_HTML="${VALIDATE_HTML,,}" - VALIDATE_JAVASCRIPT_ES="${VALIDATE_JAVASCRIPT_ES,,}" - VALIDATE_JAVASCRIPT_STANDARD="${VALIDATE_JAVASCRIPT_STANDARD,,}" - VALIDATE_JSON="${VALIDATE_JSON,,}" - VALIDATE_JSX="${VALIDATE_JSX,,}" - VALIDATE_KOTLIN="${VALIDATE_KOTLIN,,}" - VALIDATE_MARKDOWN="${VALIDATE_MARKDOWN,,}" - VALIDATE_OPENAPI="${VALIDATE_OPENAPI,,}" - VALIDATE_PERL="${VALIDATE_PERL,,}" - VALIDATE_PHP="${VALIDATE_PHP,,}" - VALIDATE_POWERSHELL="${VALIDATE_POWERSHELL,,}" - VALIDATE_PROTOBUF="${VALIDATE_PROTOBUF,,}" - VALIDATE_PYTHON="${VALIDATE_PYTHON,,}" - VALIDATE_RAKU="${VALIDATE_RAKU,,}" - VALIDATE_RUBY="${VALIDATE_RUBY,,}" - VALIDATE_TERRAFORM="${VALIDATE_TERRAFORM,,}" - VALIDATE_TSX="${VALIDATE_TSX,,}" - VALIDATE_TYPESCRIPT_ES="${VALIDATE_TYPESCRIPT_ES,,}" - VALIDATE_TYPESCRIPT_STANDARD="${VALIDATE_TYPESCRIPT_STANDARD,,}" - VALIDATE_YAML="${VALIDATE_YAML,,}" - VALIDATE_XML="${VALIDATE_XML,,}" + # Loop through all languages + for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do + # build the variable + VALIDATE_LANGUAGE="VALIDATE_${LANGUAGE}" + # Set the value of the var to lowercase + eval "${VALIDATE_LANGUAGE}=${!VALIDATE_LANGUAGE,,}" + done ################################################ # Determine if any linters were explicitly set # ################################################ ANY_SET="false" - if [[ -n ${VALIDATE_YAML} || -n \ - ${VALIDATE_JSON} || -n \ - ${VALIDATE_XML} || -n \ - ${VALIDATE_MARKDOWN} || -n \ - ${VALIDATE_BASH} || -n \ - ${VALIDATE_PERL} || -n \ - ${VALIDATE_RAKU} || -n \ - ${VALIDATE_PHP} || -n \ - ${VALIDATE_PYTHON} || -n \ - ${VALIDATE_RUBY} || -n \ - ${VALIDATE_COFFEE} || -n \ - ${VALIDATE_ANSIBLE} || -n \ - ${VALIDATE_JAVASCRIPT_ES} || -n \ - ${VALIDATE_JAVASCRIPT_STANDARD} || -n \ - ${VALIDATE_TYPESCRIPT_ES} || -n \ - ${VALIDATE_TYPESCRIPT_STANDARD} || -n \ - ${VALIDATE_DOCKER} || -n \ - ${VALIDATE_GO} || -n \ - ${VALIDATE_TERRAFORM} || -n \ - ${VALIDATE_POWERSHELL} || -n \ - ${VALIDATE_ARM} || -n \ - ${VALIDATE_CSS} || -n \ - ${VALIDATE_ENV} || -n \ - ${VALIDATE_CLOJURE} || -n \ - ${VALIDATE_PROTOBUF} || -n \ - ${VALIDATE_OPENAPI} || -n \ - ${VALIDATE_KOTLIN} || -n \ - ${VALIDATE_DART} || -n \ - ${VALIDATE_EDITORCONFIG} || -n \ - ${VALIDATE_HTML} ]]; then - ANY_SET="true" - fi - - #################################### - # Validate if we should check YAML # - #################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_YAML} ]]; then - # YAML flag was not set - default to false - VALIDATE_YAML="false" + # Loop through all languages + for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do + # build the variable + VALIDATE_LANGUAGE="VALIDATE_${LANGUAGE}" + # Check to see if the variable was set + if [ -n "${!VALIDATE_LANGUAGE}" ]; then + # It was set, need to set flag + ANY_SET="true" fi - else - # No linter flags were set - default all to true - VALIDATE_YAML="true" - fi - - #################################### - # Validate if we should check JSON # - #################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_JSON} ]]; then - # JSON flag was not set - default to false - VALIDATE_JSON="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_JSON="true" - fi - - ################################### - # Validate if we should check XML # - ################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_XML} ]]; then - # XML flag was not set - default to false - VALIDATE_XML="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_XML="true" - fi - - ######################################## - # Validate if we should check MARKDOWN # - ######################################## - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_MARKDOWN} ]]; then - # MD flag was not set - default to false - VALIDATE_MARKDOWN="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_MARKDOWN="true" - fi - - #################################### - # Validate if we should check BASH # - #################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_BASH} ]]; then - # BASH flag was not set - default to false - VALIDATE_BASH="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_BASH="true" - fi - - #################################### - # Validate if we should check PERL # - #################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_PERL} ]]; then - # PERL flag was not set - default to false - VALIDATE_PERL="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_PERL="true" - fi - - #################################### - # Validate if we should check RAKU # - #################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_RAKU} ]]; then - # RAKU flag was not set - default to false - VALIDATE_RAKU="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_RAKU="true" - fi - - #################################### - # Validate if we should check PHP # - #################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_PHP} ]]; then - # PHP flag was not set - default to false - VALIDATE_PHP="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_PHP="true" - fi - - ###################################### - # Validate if we should check PYTHON # - ###################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_PYTHON} ]]; then - # PYTHON flag was not set - default to false - VALIDATE_PYTHON="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_PYTHON="true" - fi - - #################################### - # Validate if we should check RUBY # - #################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_RUBY} ]]; then - # RUBY flag was not set - default to false - VALIDATE_RUBY="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_RUBY="true" - fi - - ###################################### - # Validate if we should check COFFEE # - ###################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_COFFEE} ]]; then - # COFFEE flag was not set - default to false - VALIDATE_COFFEE="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_COFFEE="true" - fi - - ####################################### - # Validate if we should check ANSIBLE # - ####################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_ANSIBLE} ]]; then - # ANSIBLE flag was not set - default to false - VALIDATE_ANSIBLE="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_ANSIBLE="true" - fi - - ############################################# - # Validate if we should check JAVASCRIPT_ES # - ############################################# - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_JAVASCRIPT_ES} ]]; then - # JAVASCRIPT_ES flag was not set - default to false - VALIDATE_JAVASCRIPT_ES="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_JAVASCRIPT_ES="true" - fi + done ################################################### - # Validate if we should check JAVASCRIPT_STANDARD # + # Validate if we should check individual lanuages # ################################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_JAVASCRIPT_STANDARD} ]]; then - # JAVASCRIPT_STANDARD flag was not set - default to false - VALIDATE_JAVASCRIPT_STANDARD="false" + # Loop through all languages + for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do + # build the variable + VALIDATE_LANGUAGE="VALIDATE_${LANGUAGE}" + # Check if ANY_SET was set + if [[ ${ANY_SET} == "true" ]]; then + # Check to see if the variable was set + if [ -z "${!VALIDATE_LANGUAGE}" ]; then + # Flag was not set, default to false + eval "${VALIDATE_LANGUAGE}='false'" + fi + else + # No linter flags were set - default all to true + eval "${VALIDATE_LANGUAGE}='true'" fi - else - # No linter flags were set - default all to true - VALIDATE_JAVASCRIPT_STANDARD="true" - fi - - ############################################# - # Validate if we should check JSX # - ############################################# - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_JSX} ]]; then - # JSX flag was not set - default to false - VALIDATE_JSX="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_JSX="true" - fi - - ############################################# - # Validate if we should check TSX # - ############################################# - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_TSX} ]]; then - # TSX flag was not set - default to false - VALIDATE_TSX="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_TSX="true" - fi - - ############################################# - # Validate if we should check TYPESCRIPT_ES # - ############################################# - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_TYPESCRIPT_ES} ]]; then - # TYPESCRIPT_ES flag was not set - default to false - VALIDATE_TYPESCRIPT_ES="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_TYPESCRIPT_ES="true" - fi - - ################################################### - # Validate if we should check TYPESCRIPT_STANDARD # - ################################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_TYPESCRIPT_STANDARD} ]]; then - # TYPESCRIPT_STANDARD flag was not set - default to false - VALIDATE_TYPESCRIPT_STANDARD="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_TYPESCRIPT_STANDARD="true" - fi - - ###################################### - # Validate if we should check DOCKER # - ###################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_DOCKER} ]]; then - # DOCKER flag was not set - default to false - VALIDATE_DOCKER="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_DOCKER="true" - fi - - ################################## - # Validate if we should check GO # - ################################## - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_GO} ]]; then - # GO flag was not set - default to false - VALIDATE_GO="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_GO="true" - fi - - ######################################### - # Validate if we should check TERRAFORM # - ######################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_TERRAFORM} ]]; then - # TERRAFORM flag was not set - default to false - VALIDATE_TERRAFORM="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_TERRAFORM="true" - fi - - ######################################### - # Validate if we should check POWERSHELL # - ######################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_POWERSHELL} ]]; then - # POWERSHELL flag was not set - default to false - VALIDATE_POWERSHELL="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_POWERSHELL="true" - fi - - ################################### - # Validate if we should check ARM # - ################################### - if [[ "${ANY_SET}" == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z "${VALIDATE_ARM}" ]]; then - # ARM flag was not set - default to false - VALIDATE_ARM="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_ARM="true" - fi - - ################################### - # Validate if we should check CSS # - ################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_CSS} ]]; then - # CSS flag was not set - default to false - VALIDATE_CSS="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_CSS="true" - fi - - ################################### - # Validate if we should check ENV # - ################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_ENV} ]]; then - # ENV flag was not set - default to false - VALIDATE_ENV="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_ENV="true" - fi - - ###################################### - # Validate if we should check KOTLIN # - ###################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_KOTLIN} ]]; then - # ENV flag was not set - default to false - VALIDATE_KOTLIN="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_KOTLIN="true" - fi - - #################################### - # Validate if we should check DART # - #################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_DART} ]]; then - # ENV flag was not set - default to false - VALIDATE_DART="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_DART="true" - fi - - ####################################### - # Validate if we should check OPENAPI # - ####################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_OPENAPI} ]]; then - # OPENAPI flag was not set - default to false - VALIDATE_OPENAPI="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_OPENAPI="true" - fi - - ####################################### - # Validate if we should check PROTOBUF # - ####################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_PROTOBUF} ]]; then - # PROTOBUF flag was not set - default to false - VALIDATE_PROTOBUF="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_PROTOBUF="true" - fi - - ####################################### - # Validate if we should check Clojure # - ####################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_CLOJURE} ]]; then - # Clojure flag was not set - default to false - VALIDATE_CLOJURE="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_CLOJURE="true" - fi - - ############################################ - # Validate if we should check editorconfig # - ############################################ - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_EDITORCONFIG} ]]; then - # EDITORCONFIG flag was not set - default to false - VALIDATE_EDITORCONFIG="false" - fi - else - # No linter flags were set - # special case checking for .editorconfig - if [ -f "${GITHUB_WORKSPACE}/.editorconfig" ]; then - VALIDATE_EDITORCONFIG="true" - fi - fi - - #################################### - # Validate if we should check HTML # - #################################### - if [[ ${ANY_SET} == "true" ]]; then - # Some linter flags were set - only run those set to true - if [[ -z ${VALIDATE_HTML} ]]; then - # HTML flag was not set - default to false - VALIDATE_HTML="false" - fi - else - # No linter flags were set - default all to true - VALIDATE_HTML="true" - fi + done ####################################### # Print which linters we are enabling # ####################################### - if [[ ${VALIDATE_YAML} == "true" ]]; then - PRINT_ARRAY+=("- Validating [YAML] files in code base...") - else - PRINT_ARRAY+=("- Excluding [YAML] files in code base...") - fi - if [[ ${VALIDATE_JSON} == "true" ]]; then - PRINT_ARRAY+=("- Validating [JSON] files in code base...") - else - PRINT_ARRAY+=("- Excluding [JSON] files in code base...") - fi - if [[ ${VALIDATE_XML} == "true" ]]; then - PRINT_ARRAY+=("- Validating [XML] files in code base...") - else - PRINT_ARRAY+=("- Excluding [XML] files in code base...") - fi - if [[ ${VALIDATE_MARKDOWN} == "true" ]]; then - PRINT_ARRAY+=("- Validating [MARKDOWN] files in code base...") - else - PRINT_ARRAY+=("- Excluding [MARKDOWN] files in code base...") - fi - if [[ ${VALIDATE_BASH} == "true" ]]; then - PRINT_ARRAY+=("- Validating [BASH] files in code base...") - else - PRINT_ARRAY+=("- Excluding [BASH] files in code base...") - fi - if [[ ${VALIDATE_PERL} == "true" ]]; then - PRINT_ARRAY+=("- Validating [PERL] files in code base...") - else - PRINT_ARRAY+=("- Excluding [PERL] files in code base...") - fi - if [[ ${VALIDATE_RAKU} == "true" ]]; then - PRINT_ARRAY+=("- Validating [RAKU] files in code base...") - else - PRINT_ARRAY+=("- Excluding [RAKU] files in code base...") - fi - if [[ ${VALIDATE_PHP} == "true" ]]; then - PRINT_ARRAY+=("- Validating [PHP] files in code base...") - else - PRINT_ARRAY+=("- Excluding [PHP] files in code base...") - fi - if [[ ${VALIDATE_PYTHON} == "true" ]]; then - PRINT_ARRAY+=("- Validating [PYTHON] files in code base...") - else - PRINT_ARRAY+=("- Excluding [PYTHON] files in code base...") - fi - if [[ ${VALIDATE_RUBY} == "true" ]]; then - PRINT_ARRAY+=("- Validating [RUBY] files in code base...") - else - PRINT_ARRAY+=("- Excluding [RUBY] files in code base...") - fi - if [[ ${VALIDATE_COFFEE} == "true" ]]; then - PRINT_ARRAY+=("- Validating [COFFEE] files in code base...") - else - PRINT_ARRAY+=("- Excluding [COFFEE] files in code base...") - fi - if [[ ${VALIDATE_ANSIBLE} == "true" ]]; then - PRINT_ARRAY+=("- Validating [ANSIBLE] files in code base...") - else - PRINT_ARRAY+=("- Excluding [ANSIBLE] files in code base...") - fi - if [[ ${VALIDATE_JAVASCRIPT_ES} == "true" ]]; then - PRINT_ARRAY+=("- Validating [JAVASCRIPT(eslint)] files in code base...") - else - PRINT_ARRAY+=("- Excluding [JAVASCRIPT(eslint)] files in code base...") - fi - if [[ ${VALIDATE_JAVASCRIPT_STANDARD} == "true" ]]; then - PRINT_ARRAY+=("- Validating [JAVASCRIPT(standard)] files in code base...") - else - PRINT_ARRAY+=("- Excluding [JAVASCRIPT(standard)] files in code base...") - fi - if [[ ${VALIDATE_TYPESCRIPT_ES} == "true" ]]; then - PRINT_ARRAY+=("- Validating [TYPESCRIPT(eslint)] files in code base...") - else - PRINT_ARRAY+=("- Excluding [TYPESCRIPT(eslint)] files in code base...") - fi - if [[ ${VALIDATE_TYPESCRIPT_STANDARD} == "true" ]]; then - PRINT_ARRAY+=("- Validating [TYPESCRIPT(standard)] files in code base...") - else - PRINT_ARRAY+=("- Excluding [TYPESCRIPT(standard)] files in code base...") - fi - if [[ ${VALIDATE_DOCKER} == "true" ]]; then - PRINT_ARRAY+=("- Validating [DOCKER] files in code base...") - else - PRINT_ARRAY+=("- Excluding [DOCKER] files in code base...") - fi - if [[ ${VALIDATE_GO} == "true" ]]; then - PRINT_ARRAY+=("- Validating [GOLANG] files in code base...") - else - PRINT_ARRAY+=("- Excluding [GOLANG] files in code base...") - fi - if [[ ${VALIDATE_TERRAFORM} == "true" ]]; then - PRINT_ARRAY+=("- Validating [TERRAFORM] files in code base...") - else - PRINT_ARRAY+=("- Excluding [TERRAFORM] files in code base...") - fi - if [[ ${VALIDATE_POWERSHELL} == "true" ]]; then - PRINT_ARRAY+=("- Validating [POWERSHELL] files in code base...") - else - PRINT_ARRAY+=("- Excluding [POWERSHELL] files in code base...") - fi - if [[ ${VALIDATE_ARM} == "true" ]]; then - PRINT_ARRAY+=("- Validating [ARM] files in code base...") - else - PRINT_ARRAY+=("- Excluding [ARM] files in code base...") - fi - if [[ ${VALIDATE_CSS} == "true" ]]; then - PRINT_ARRAY+=("- Validating [CSS] files in code base...") - else - PRINT_ARRAY+=("- Excluding [CSS] files in code base...") - fi - if [[ ${VALIDATE_CLOJURE} == "true" ]]; then - PRINT_ARRAY+=("- Validating [CLOJURE] files in code base...") - else - PRINT_ARRAY+=("- Excluding [CLOJURE] files in code base...") - fi - if [[ ${VALIDATE_ENV} == "true" ]]; then - PRINT_ARRAY+=("- Validating [ENV] files in code base...") - else - PRINT_ARRAY+=("- Excluding [ENV] files in code base...") - fi - if [[ ${VALIDATE_KOTLIN} == "true" ]]; then - PRINT_ARRAY+=("- Validating [KOTLIN] files in code base...") - else - PRINT_ARRAY+=("- Excluding [KOTLIN] files in code base...") - fi - if [[ ${VALIDATE_OPENAPI} == "true" ]]; then - PRINT_ARRAY+=("- Validating [OPENAPI] files in code base...") - else - PRINT_ARRAY+=("- Excluding [OPENAPI] files in code base...") - fi - if [[ ${VALIDATE_PROTOBUF} == "true" ]]; then - PRINT_ARRAY+=("- Validating [PROTOBUF] files in code base...") - else - PRINT_ARRAY+=("- Excluding [PROTOBUF] files in code base...") - fi - if [[ ${VALIDATE_DART} == "true" ]]; then - PRINT_ARRAY+=("- Validating [DART] files in code base...") - else - PRINT_ARRAY+=("- Excluding [DART] files in code base...") - fi - if [[ ${VALIDATE_EDITORCONFIG} == "true" ]]; then - PRINT_ARRAY+=("- Validating [EDITORCONFIG] files in code base...") - else - PRINT_ARRAY+=("- Excluding [EDITORCONFIG] files in code base...") - fi - if [[ ${VALIDATE_HTML} == "true" ]]; then - PRINT_ARRAY+=("- Validating [HTML] files in code base...") - else - PRINT_ARRAY+=("- Excluding [HTML] files in code base...") - fi + # Loop through all languages + for LANGUAGE in "${LANGUAGE_ARRAY[@]}"; do + # build the variable + VALIDATE_LANGUAGE="VALIDATE_${LANGUAGE}" + if [[ ${!VALIDATE_LANGUAGE} == "true" ]]; then + # We need to validate + PRINT_ARRAY+=("- Validating [$LANGUAGE] files in code base...") + else + # We are skipping the language + PRINT_ARRAY+=("- Excluding [$LANGUAGE] files in code base...") + fi + done ############################## # Validate Ansible Directory # @@ -783,23 +166,19 @@ function GetValidationInfo() { ACTIONS_RUNNER_DEBUG="true" fi - ################### - # Debug on runner # - ################### - if [[ ${ACTIONS_RUNNER_DEBUG} == "true" ]]; then - ########################### - # Print the validate info # - ########################### - for LINE in "${PRINT_ARRAY[@]}"; do - echo "${LINE}" - done + ########################### + # Print the validate info # + ########################### + for LINE in "${PRINT_ARRAY[@]}"; do + debug "${LINE}" + done - echo "--- DEBUG INFO ---" - echo "---------------------------------------------" - RUNNER=$(whoami) - echo "Runner:[${RUNNER}]" - echo "ENV:" - printenv - echo "---------------------------------------------" - fi + debug "--- DEBUG INFO ---" + debug "---------------------------------------------" + RUNNER=$(whoami) + debug "Runner:[${RUNNER}]" + PRINTENV=$(printenv) + debug "ENV:" + debug "${PRINTENV}" + debug "---------------------------------------------" } diff --git a/lib/worker.sh b/lib/worker.sh index 4662b7dd..3cde38b6 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -17,7 +17,7 @@ function LintCodebase() { LINTER_NAME="${1}" && shift # Pull the variable and remove from array path (Example: jsonlint) LINTER_COMMAND="${1}" && shift # Pull the variable and remove from array path (Example: jsonlint -c ConfigFile /path/to/file) FILE_EXTENSIONS="${1}" && shift # Pull the variable and remove from array path (Example: *.json) - FILE_ARRAY=("$@") # Array of files to validate (Example: ${FILE_ARRAY_JSON}) + FILE_ARRAY=("$@") # Array of files to validate (Example: ${FILE_ARRAY_JSON}) ###################### # Create Print Array # @@ -49,14 +49,11 @@ function LintCodebase() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # Failed - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to find [${LINTER_NAME}] in system!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${VALIDATE_INSTALL_CMD}]${NC}" - exit 1 + error "Failed to find [${LINTER_NAME}] in system!" + fatal "[${VALIDATE_INSTALL_CMD}]" else # Success - if [[ ${ACTIONS_RUNNER_DEBUG} == "true" ]]; then - echo -e "${NC}${F[B]}Successfully found binary for ${F[W]}[${LINTER_NAME}]${F[B]} in system location: ${F[W]}[${VALIDATE_INSTALL_CMD}]${NC}" - fi + debug "Successfully found binary for ${F[W]}[${LINTER_NAME}]${F[B]} in system location: ${F[W]}[${VALIDATE_INSTALL_CMD}]" fi ########################## @@ -75,7 +72,7 @@ function LintCodebase() { if [ ${#FILE_ARRAY[@]} -eq 0 ] && [ "${VALIDATE_ALL_CODEBASE}" == "false" ]; then # No files found in commit and user has asked to not validate code base SKIP_FLAG=1 - # echo " - No files found in changeset to lint for language:[${FILE_TYPE}]" + debug " - No files found in changeset to lint for language:[${FILE_TYPE}]" elif [ ${#FILE_ARRAY[@]} -ne 0 ]; then # We have files added to array of files to check LIST_FILES=("${FILE_ARRAY[@]}") # Copy the array into list @@ -121,13 +118,13 @@ function LintCodebase() { ######################### # Print the header info # ######################### - echo "${LINE}" + info "${LINE}" done ######################################## # Prepare context if TAP format output # ######################################## - if IsTAP ; then + if IsTAP; then TMPFILE=$(mktemp -q "/tmp/super-linter-${FILE_TYPE}.XXXXXX") INDEX=0 mkdir -p "${REPORT_OUTPUT_FOLDER}" @@ -138,10 +135,11 @@ function LintCodebase() { # Lint the files # ################## for FILE in "${LIST_FILES[@]}"; do - ##################### - # Get the file name # - ##################### + ################################### + # Get the file name and directory # + ################################### FILE_NAME=$(basename "${FILE}" 2>&1) + DIR_NAME=$(dirname "${FILE}" 2>&1) ##################################################### # Make sure we dont lint node modules or test cases # @@ -165,8 +163,8 @@ function LintCodebase() { ############## # File print # ############## - echo "---------------------------" - echo "File:[${FILE}]" + info "---------------------------" + info "File:[${FILE}]" ################################# # Add the language to the array # @@ -193,6 +191,17 @@ function LintCodebase() { pwsh -NoProfile -NoLogo -Command "${LINTER_COMMAND} ${FILE}; if (\${Error}.Count) { exit 1 }" exit $? 2>&1 ) + ############################################################################### + # Corner case for groovy as we have to pass it as path and file in ant format # + ############################################################################### + elif [[ ${FILE_TYPE} == "GROOVY" ]]; then + ####################################### + # Lint the file with the updated path # + ####################################### + LINT_CMD=$( + cd "${GITHUB_WORKSPACE}" || exit + ${LINTER_COMMAND} --path "${DIR_NAME}" --files "$FILE_NAME" 2>&1 + ) else ################################ # Lint the file with the rules # @@ -202,7 +211,6 @@ function LintCodebase() { ${LINTER_COMMAND} "${FILE}" 2>&1 ) fi - ####################### # Load the error code # ####################### @@ -215,15 +223,16 @@ function LintCodebase() { ######### # Error # ######### - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Found errors in [${LINTER_NAME}] linter!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${LINT_CMD}]${NC}" + error "Found errors in [${LINTER_NAME}] linter!" + error "[${LINT_CMD}]" + error "Linter CMD:[${LINTER_COMMAND} ${FILE}]" # Increment the error count (("ERRORS_FOUND_${FILE_TYPE}++")) ####################################################### # Store the linting as a temporary file in TAP format # ####################################################### - if IsTAP ; then + if IsTAP; then NotOkTap "${INDEX}" "${FILE}" "${TMPFILE}" AddDetailedMessageIfEnabled "${LINT_CMD}" "${TMPFILE}" fi @@ -231,12 +240,12 @@ function LintCodebase() { ########### # Success # ########### - echo -e "${NC}${F[B]} - File:${F[W]}[${FILE_NAME}]${F[B]} was linted with ${F[W]}[${LINTER_NAME}]${F[B]} successfully${NC}" + info " - File:${F[W]}[${FILE_NAME}]${F[B]} was linted with ${F[W]}[${LINTER_NAME}]${F[B]} successfully" ####################################################### # Store the linting as a temporary file in TAP format # ####################################################### - if IsTAP ; then + if IsTAP; then OkTap "${INDEX}" "${FILE}" "${TMPFILE}" fi fi @@ -245,7 +254,7 @@ function LintCodebase() { ################################# # Generate report in TAP format # ################################# - if IsTAP && [ ${INDEX} -gt 0 ] ; then + if IsTAP && [ ${INDEX} -gt 0 ]; then HeaderTap "${INDEX}" "${REPORT_OUTPUT_FILE}" cat "${TMPFILE}" >> "${REPORT_OUTPUT_FILE}" fi @@ -262,18 +271,16 @@ function TestCodebase() { LINTER_COMMAND="${3}" # Pull the variable and remove from array path (Example: jsonlint -c ConfigFile /path/to/file) FILE_EXTENSIONS="${4}" # Pull the variable and remove from array path (Example: *.json) INDVIDUAL_TEST_FOLDER="${5}" # Folder for specific tests - TESTS_RAN=0 # Incremented when tests are ran, this will help find failed finds + TESTS_RAN=0 # Incremented when tests are ran, this will help find failed finds ################ # print header # ################ - echo "" - echo "----------------------------------------------" - echo "----------------------------------------------" - echo "Testing Codebase [${FILE_TYPE}] files..." - echo "----------------------------------------------" - echo "----------------------------------------------" - echo "" + info "----------------------------------------------" + info "----------------------------------------------" + info "Testing Codebase [${FILE_TYPE}] files..." + info "----------------------------------------------" + info "----------------------------------------------" ##################################### # Validate we have linter installed # @@ -290,12 +297,11 @@ function TestCodebase() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # Failed - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to find [${LINTER_NAME}] in system!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${VALIDATE_INSTALL_CMD}]${NC}" - exit 1 + error "Failed to find [${LINTER_NAME}] in system!" + fatal "[${VALIDATE_INSTALL_CMD}]" else # Success - echo -e "${NC}${F[B]}Successfully found binary for ${F[W]}[${LINTER_NAME}]${F[B]} in system location: ${F[W]}[${VALIDATE_INSTALL_CMD}]${NC}" + info "Successfully found binary for ${F[W]}[${LINTER_NAME}]${F[B]} in system location: ${F[W]}[${VALIDATE_INSTALL_CMD}]" fi ########################## @@ -311,7 +317,7 @@ function TestCodebase() { ######################################## # Prepare context if TAP output format # ######################################## - if IsTAP ; then + if IsTAP; then TMPFILE=$(mktemp -q "/tmp/super-linter-${FILE_TYPE}.XXXXXX") mkdir -p "${REPORT_OUTPUT_FOLDER}" REPORT_OUTPUT_FILE="${REPORT_OUTPUT_FOLDER}/super-linter-${FILE_TYPE}.${OUTPUT_FORMAT}" @@ -325,6 +331,7 @@ function TestCodebase() { # Get the file name # ##################### FILE_NAME=$(basename "${FILE}" 2>&1) + DIR_NAME=$(dirname "${FILE}" 2>&1) ############################ # Get the file pass status # @@ -345,8 +352,8 @@ function TestCodebase() { ############## # File print # ############## - echo "---------------------------" - echo "File:[${FILE}]" + info "---------------------------" + info "File:[${FILE}]" ######################## # Set the lint command # @@ -399,6 +406,17 @@ function TestCodebase() { pwsh -NoProfile -NoLogo -Command "${LINTER_COMMAND} ${FILE}; if (\${Error}.Count) { exit 1 }" exit $? 2>&1 ) + ############################################################################### + # Corner case for groovy as we have to pass it as path and file in ant format # + ############################################################################### + elif [[ ${FILE_TYPE} == "GROOVY" ]]; then + ####################################### + # Lint the file with the updated path # + ####################################### + LINT_CMD=$( + cd "${GITHUB_WORKSPACE}" || exit + ${LINTER_COMMAND} --path "${DIR_NAME}" --files "$FILE_NAME" 2>&1 + ) else ################################ # Lint the file with the rules # @@ -430,21 +448,21 @@ function TestCodebase() { ######### # Error # ######### - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Found errors in [${LINTER_NAME}] linter!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${LINT_CMD}]${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC} Linter CMD:[${LINTER_COMMAND} ${FILE}]${NC}" + error "Found errors in [${LINTER_NAME}] linter!" + error "[${LINT_CMD}]" + error "Linter CMD:[${LINTER_COMMAND} ${FILE}]" # Increment the error count (("ERRORS_FOUND_${FILE_TYPE}++")) else ########### # Success # ########### - echo -e "${NC}${F[B]} - File:${F[W]}[${FILE_NAME}]${F[B]} was linted with ${F[W]}[${LINTER_NAME}]${F[B]} successfully${NC}" + info " - File:${F[W]}[${FILE_NAME}]${F[B]} was linted with ${F[W]}[${LINTER_NAME}]${F[B]} successfully" fi ####################################################### # Store the linting as a temporary file in TAP format # ####################################################### - if IsTAP ; then + if IsTAP; then OkTap "${TESTS_RAN}" "${FILE_NAME}" "${TMPFILE}" fi else @@ -458,22 +476,23 @@ function TestCodebase() { ######### # Error # ######### - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Found errors in [${LINTER_NAME}] linter!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} This file should have failed test case!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${LINT_CMD}]${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC} Linter CMD:[${LINTER_COMMAND} ${FILE}]${NC}" + error "Found errors in [${LINTER_NAME}] linter!" + error "This file should have failed test case!" + error "Command run:${NC}[\$${LINT_CMD}]" + error "[${LINT_CMD}]" + error "Linter CMD:[${LINTER_COMMAND} ${FILE}]" # Increment the error count (("ERRORS_FOUND_${FILE_TYPE}++")) else ########### # Success # ########### - echo -e "${NC}${F[B]} - File:${F[W]}[${FILE_NAME}]${F[B]} failed test case with ${F[W]}[${LINTER_NAME}]${F[B]} successfully${NC}" + info " - File:${F[W]}[${FILE_NAME}]${F[B]} failed test case with ${F[W]}[${LINTER_NAME}]${F[B]} successfully" fi ####################################################### # Store the linting as a temporary file in TAP format # ####################################################### - if IsTAP ; then + if IsTAP; then NotOkTap "${TESTS_RAN}" "${FILE_NAME}" "${TMPFILE}" AddDetailedMessageIfEnabled "${LINT_CMD}" "${TMPFILE}" fi @@ -483,7 +502,7 @@ function TestCodebase() { ########################################################################### # Generate report in TAP format and validate with the expected TAP output # ########################################################################### - if IsTAP && [ ${TESTS_RAN} -gt 0 ] ; then + if IsTAP && [ ${TESTS_RAN} -gt 0 ]; then HeaderTap "${TESTS_RAN}" "${REPORT_OUTPUT_FILE}" cat "${TMPFILE}" >> "${REPORT_OUTPUT_FILE}" @@ -491,24 +510,24 @@ function TestCodebase() { # If expected TAP report exists then compare with the generated report # ######################################################################## EXPECTED_FILE="${GITHUB_WORKSPACE}/${TEST_CASE_FOLDER}/${INDVIDUAL_TEST_FOLDER}/reports/expected-${FILE_TYPE}.tap" - if [ -e "${EXPECTED_FILE}" ] ; then + if [ -e "${EXPECTED_FILE}" ]; then TMPFILE=$(mktemp -q "/tmp/diff-${FILE_TYPE}.XXXXXX") ## Ignore white spaces, case sensitive if ! diff -a -w -i "${EXPECTED_FILE}" "${REPORT_OUTPUT_FILE}" > "${TMPFILE}" 2>&1; then ############################################# # We failed to compare the reporting output # ############################################# - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to assert TAP output:[${LINTER_NAME}]${NC}"! - echo "Please validate the asserts!" + error "Failed to assert TAP output:[${LINTER_NAME}]"! + info "Please validate the asserts!" cat "${TMPFILE}" exit 1 else # Success - echo -e "${NC}${F[B]}Successfully validation in the expected TAP format for ${F[W]}[${LINTER_NAME}]${NC}" + info "Successfully validation in the expected TAP format for ${F[W]}[${LINTER_NAME}]" fi else - echo -e "${NC}${F[Y]}WARN!${NC} No TAP expected file found at:[${EXPECTED_FILE}]${NC}" - echo "skipping report assertions" + warn "No TAP expected file found at:[${EXPECTED_FILE}]" + info "skipping report assertions" ##################################### # Append the file type to the array # ##################################### @@ -523,9 +542,8 @@ function TestCodebase() { ################################################# # We failed to find files and no tests were ran # ################################################# - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to find any tests ran for the Linter:[${LINTER_NAME}]${NC}"! - echo "Please validate logic or that tests exist!" - exit 1 + error "Failed to find any tests ran for the Linter:[${LINTER_NAME}]"! + fatal "Please validate logic or that tests exist!" fi } ################################################################################ @@ -542,11 +560,9 @@ function RunTestCases() { ################# # Header prints # ################# - echo "" - echo "----------------------------------------------" - echo "-------------- TEST CASE RUN -----------------" - echo "----------------------------------------------" - echo "" + info "----------------------------------------------" + info "-------------- TEST CASE RUN -----------------" + info "----------------------------------------------" ####################### # Test case languages # @@ -555,7 +571,7 @@ function RunTestCases() { TestCodebase "ANSIBLE" "ansible-lint" "ansible-lint -v -c ${ANSIBLE_LINTER_RULES}" ".*\.\(yml\|yaml\)\$" "ansible" TestCodebase "ARM" "arm-ttk" "Import-Module ${ARM_TTK_PSD1} ; \${config} = \$(Import-PowerShellDataFile -Path ${ARM_LINTER_RULES}) ; Test-AzTemplate @config -TemplatePath" ".*\.\(json\)\$" "arm" TestCodebase "BASH" "shellcheck" "shellcheck --color" ".*\.\(sh\|bash\|dash\|ksh\)\$" "shell" - TestCodebase "CFN" "cfn-lint" "cfn-lint --config-file ${CFN_LINTER_RULES}" ".*\.\(json\|yml\|yaml\)\$" "cfn" + TestCodebase "CLOUDFORMATION" "cfn-lint" "cfn-lint --config-file ${CLOUDFORMATION_LINTER_RULES}" ".*\.\(json\|yml\|yaml\)\$" "cloudformation" TestCodebase "CLOJURE" "clj-kondo" "clj-kondo --config ${CLOJURE_LINTER_RULES} --lint" ".*\.\(clj\|cljs\|cljc\|edn\)\$" "clojure" TestCodebase "COFFEESCRIPT" "coffeelint" "coffeelint -f ${COFFEESCRIPT_LINTER_RULES}" ".*\.\(coffee\)\$" "coffeescript" TestCodebase "CSS" "stylelint" "stylelint --config ${CSS_LINTER_RULES}" ".*\.\(css\)\$" "css" @@ -564,25 +580,33 @@ function RunTestCases() { TestCodebase "EDITORCONFIG" "editorconfig-checker" "editorconfig-checker" ".*\.ext$" "editorconfig-checker" TestCodebase "ENV" "dotenv-linter" "dotenv-linter" ".*\.\(env\)\$" "env" TestCodebase "GO" "golangci-lint" "golangci-lint run -c ${GO_LINTER_RULES}" ".*\.\(go\)\$" "golang" + TestCodebase "GROOVY" "npm-groovy-lint" "npm-groovy-lint -c $GROOVY_LINTER_RULES --failon error" ".*\.\(groovy\|jenkinsfile\|gradle\)\$" "groovy" TestCodebase "HTML" "htmlhint" "htmlhint --config ${HTML_LINTER_RULES}" ".*\.\(html\)\$" "html" TestCodebase "JAVASCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${JAVASCRIPT_LINTER_RULES}" ".*\.\(js\)\$" "javascript" TestCodebase "JAVASCRIPT_STANDARD" "standard" "standard ${JAVASCRIPT_STANDARD_LINTER_RULES}" ".*\.\(js\)\$" "javascript" TestCodebase "JSON" "jsonlint" "jsonlint" ".*\.\(json\)\$" "json" TestCodebase "KOTLIN" "ktlint" "ktlint" ".*\.\(kt\|kts\)\$" "kotlin" + TestCodebase "LUA" "lua" "luacheck" ".*\.\(lua\)\$" "lua" TestCodebase "MARKDOWN" "markdownlint" "markdownlint -c ${MARKDOWN_LINTER_RULES}" ".*\.\(md\)\$" "markdown" TestCodebase "PERL" "perl" "perl -Mstrict -cw" ".*\.\(pl\)\$" "perl" - TestCodebase "PHP" "php" "php -l" ".*\.\(php\)\$" "php" + TestCodebase "PHP_BUILTIN" "php" "php -l" ".*\.\(php\)\$" "php" + TestCodebase "PHP_PHPCS" "phpcs" "phpcs --standard=${PHP_PHPCS_LINTER_RULES}" ".*\.\(php\)\$" "php" + TestCodebase "PHP_PHPSTAN" "phpstan" "phpstan analyse --no-progress --no-ansi -c ${PHP_PHPSTAN_LINTER_RULES}" ".*\.\(php\)\$" "php" + TestCodebase "PHP_PSALM" "psalm" "psalm --config=${PHP_PSALM_LINTER_RULES}" ".*\.\(php\)\$" "php" TestCodebase "OPENAPI" "spectral" "spectral lint -r ${OPENAPI_LINTER_RULES}" ".*\.\(ymlopenapi\|jsonopenapi\)\$" "openapi" TestCodebase "POWERSHELL" "pwsh" "Invoke-ScriptAnalyzer -EnableExit -Settings ${POWERSHELL_LINTER_RULES} -Path" ".*\.\(ps1\|psm1\|psd1\|ps1xml\|pssc\|psrc\|cdxml\)\$" "powershell" TestCodebase "PROTOBUF" "protolint" "protolint lint --config_path ${PROTOBUF_LINTER_RULES}" ".*\.\(proto\)\$" "protobuf" - TestCodebase "PYTHON" "pylint" "pylint --rcfile ${PYTHON_LINTER_RULES}" ".*\.\(py\)\$" "python" + TestCodebase "PYTHON_PYLINT" "pylint" "pylint --rcfile ${PYTHON_PYLINT_LINTER_RULES}" ".*\.\(py\)\$" "python" + TestCodebase "PYTHON_FLAKE8" "flake8" "flake8 --config ${PYTHON_FLAKE8_LINTER_RULES}" ".*\.\(py\)\$" "python" TestCodebase "RAKU" "raku" "raku -c" ".*\.\(raku\|rakumod\|rakutest\|pm6\|pl6\|p6\)\$" "raku" TestCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES}" ".*\.\(rb\)\$" "ruby" + TestCodebase "STATES" "asl-validator" "asl-validator --json-path" ".*\.\(json\)\$" "states" TestCodebase "TERRAFORM" "tflint" "tflint -c ${TERRAFORM_LINTER_RULES}" ".*\.\(tf\)\$" "terraform" + TestCodebase "TERRAFORM_TERRASCAN" "terrascan" "terrascan -f " ".*\.\(tf\)\$" "terraform_terrascan" TestCodebase "TYPESCRIPT_ES" "eslint" "eslint --no-eslintrc -c ${TYPESCRIPT_LINTER_RULES}" ".*\.\(ts\)\$" "typescript" TestCodebase "TYPESCRIPT_STANDARD" "standard" "standard --parser @typescript-eslint/parser --plugin @typescript-eslint/eslint-plugin ${TYPESCRIPT_STANDARD_LINTER_RULES}" ".*\.\(ts\)\$" "typescript" TestCodebase "XML" "xmllint" "xmllint" ".*\.\(xml\)\$" "xml" - TestCodebase "YML" "yamllint" "yamllint -c ${YAML_LINTER_RULES}" ".*\.\(yml\|yaml\)\$" "yml" + TestCodebase "YAML" "yamllint" "yamllint -c ${YAML_LINTER_RULES}" ".*\.\(yml\|yaml\)\$" "yaml" ################# # Footer prints # @@ -629,16 +653,12 @@ function LintAnsibleFiles() { ############################## if [ ${ERROR_CODE} -ne 0 ]; then # Failed - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Failed to find ${LINTER_NAME} in system!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${VALIDATE_INSTALL_CMD}]${NC}" - exit 1 + error "Failed to find ${LINTER_NAME} in system!" + fatal "[${VALIDATE_INSTALL_CMD}]" else # Success - if [[ ${ACTIONS_RUNNER_DEBUG} == "true" ]]; then - # Success - echo -e "${NC}${F[B]}Successfully found binary in system${NC}" - echo "Location:[${VALIDATE_INSTALL_CMD}]" - fi + debug "Successfully found binary in system" + debug "Location:[${VALIDATE_INSTALL_CMD}]" fi ########################## @@ -673,7 +693,7 @@ function LintAnsibleFiles() { ################################### # Send message that were skipping # ################################### - #echo "- Skipping Ansible lint run as file(s) that were modified were read only..." + debug "- Skipping Ansible lint run as file(s) that were modified were read only..." ############################ # Create flag to skip loop # ############################ @@ -688,14 +708,14 @@ function LintAnsibleFiles() { ######################### # Print the header line # ######################### - echo "${LINE}" + info "${LINE}" done fi ######################################## # Prepare context if TAP output format # ######################################## - if IsTAP ; then + if IsTAP; then TMPFILE=$(mktemp -q "/tmp/super-linter-${FILE_TYPE}.XXXXXX") INDEX=0 mkdir -p "${REPORT_OUTPUT_FOLDER}" @@ -728,8 +748,8 @@ function LintAnsibleFiles() { ############## # File print # ############## - echo "---------------------------" - echo "File:[${FILE}]" + info "---------------------------" + info "File:[${FILE}]" ################################ # Lint the file with the rules # @@ -748,15 +768,15 @@ function LintAnsibleFiles() { ######### # Error # ######### - echo -e "${NC}${B[R]}${F[W]}ERROR!${NC} Found errors in [${LINTER_NAME}] linter!${NC}" - echo -e "${NC}${B[R]}${F[W]}ERROR:${NC}[${LINT_CMD}]${NC}" + error "Found errors in [${LINTER_NAME}] linter!" + error "[${LINT_CMD}]" # Increment error count ((ERRORS_FOUND_ANSIBLE++)) ####################################################### # Store the linting as a temporary file in TAP format # ####################################################### - if IsTAP ; then + if IsTAP; then NotOkTap "${INDEX}" "${FILE}" "${TMPFILE}" AddDetailedMessageIfEnabled "${LINT_CMD}" "${TMPFILE}" fi @@ -765,12 +785,12 @@ function LintAnsibleFiles() { ########### # Success # ########### - echo -e "${NC}${F[B]} - File:${F[W]}[${FILE_NAME}]${F[B]} was linted with ${F[W]}[${LINTER_NAME}]${F[B]} successfully${NC}" + info " - File:${F[W]}[${FILE_NAME}]${F[B]} was linted with ${F[W]}[${LINTER_NAME}]${F[B]} successfully" ####################################################### # Store the linting as a temporary file in TAP format # ####################################################### - if IsTAP ; then + if IsTAP; then OkTap "${INDEX}" "${FILE}" "${TMPFILE}" fi fi @@ -779,27 +799,22 @@ function LintAnsibleFiles() { ################################# # Generate report in TAP format # ################################# - if IsTAP && [ ${INDEX} -gt 0 ] ; then + if IsTAP && [ ${INDEX} -gt 0 ]; then HeaderTap "${INDEX}" "${REPORT_OUTPUT_FILE}" cat "${TMPFILE}" >> "${REPORT_OUTPUT_FILE}" fi - else # No ansible directory found in path - ############################### - # Check to see if debug is on # - ############################### - if [[ ${ACTIONS_RUNNER_DEBUG} == "true" ]]; then - ######################## - # No Ansible dir found # - ######################## - echo -e "${NC}${F[Y]}WARN!${NC} No Ansible base directory found at:[${ANSIBLE_DIRECTORY}]${NC}" - echo "skipping ansible lint" - fi + else + ######################## + # No Ansible dir found # + ######################## + warn "No Ansible base directory found at:[${ANSIBLE_DIRECTORY}]" + debug "skipping ansible lint" fi } ################################################################################ #### Function IsTap ############################################################ function IsTAP() { - if [ "${OUTPUT_FORMAT}" == "tap" ] ; then + if [ "${OUTPUT_FORMAT}" == "tap" ]; then return 0 else return 1 @@ -809,7 +824,7 @@ function IsTAP() { #### Function TransformTAPDetails ############################################## function TransformTAPDetails() { DATA=${1} - if [ -n "${DATA}" ] && [ "${OUTPUT_DETAILS}" == "detailed" ] ; then + if [ -n "${DATA}" ] && [ "${OUTPUT_DETAILS}" == "detailed" ]; then ######################################################### # Transform new lines to \\n, remove colours and colons # ######################################################### @@ -822,8 +837,8 @@ function HeaderTap() { ################ # Pull in Vars # ################ - INDEX="${1}" # File being validated - OUTPUT_FILE="${2}" # Output location + INDEX="${1}" # File being validated + OUTPUT_FILE="${2}" # Output location ################### # Print the goods # @@ -836,9 +851,9 @@ function OkTap() { ################ # Pull in Vars # ################ - INDEX="${1}" # Location - FILE="${2}" # File being validated - TEMP_FILE="${3}" # Temp file location + INDEX="${1}" # Location + FILE="${2}" # File being validated + TEMP_FILE="${3}" # Temp file location ################### # Print the goods # @@ -851,9 +866,9 @@ function NotOkTap() { ################ # Pull in Vars # ################ - INDEX="${1}" # Location - FILE="${2}" # File being validated - TEMP_FILE="${3}" # Temp file location + INDEX="${1}" # Location + FILE="${2}" # File being validated + TEMP_FILE="${3}" # Temp file location ################### # Print the goods # @@ -866,14 +881,14 @@ function AddDetailedMessageIfEnabled() { ################ # Pull in Vars # ################ - LINT_CMD="${1}" # Linter command - TEMP_FILE="${2}" # Temp file + LINT_CMD="${1}" # Linter command + TEMP_FILE="${2}" # Temp file #################### # Check the return # #################### DETAILED_MSG=$(TransformTAPDetails "${LINT_CMD}") - if [ -n "${DETAILED_MSG}" ] ; then + if [ -n "${DETAILED_MSG}" ]; then printf " ---\n message: %s\n ...\n" "${DETAILED_MSG}" >> "${TEMP_FILE}" fi } diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 33b3caa3..00000000 --- a/package-lock.json +++ /dev/null @@ -1,545 +0,0 @@ -{ - "requires": true, - "lockfileVersion": 1, - "dependencies": { - "@types/color-name": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", - "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==" - }, - "ajv": { - "version": "6.12.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.3.tgz", - "integrity": "sha512-4K0cK3L1hsqk9xIb2z9vs/XU+PGJZ9PNpJRDS9YLzmNdX6jmVPfamLvTJr0aDAusnHyCHO6MjzlkAsgtqp9teA==", - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", - "requires": { - "@types/color-name": "^1.1.1", - "color-convert": "^2.0.1" - } - }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "async": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", - "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", - "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-5.1.0.tgz", - "integrity": "sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "glob-base": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", - "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", - "requires": { - "glob-parent": "^2.0.0", - "is-glob": "^2.0.0" - } - }, - "glob-parent": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", - "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", - "requires": { - "is-glob": "^2.0.0" - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" - }, - "htmlhint": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/htmlhint/-/htmlhint-0.14.1.tgz", - "integrity": "sha512-VWKrljlwF8tEKH48YPfC30zYKhrsMqm70d7vXswivEqd3DSva8ZlIzfeCa3YWFEFRIIhiXKgKurlqEpCtYMCAA==", - "dev": true, - "requires": { - "async": "3.2.0", - "chalk": "4.0.0", - "commander": "5.1.0", - "glob": "7.1.6", - "parse-glob": "3.0.4", - "request": "2.88.2", - "strip-json-comments": "3.1.0", - "xml": "1.0.1" - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-dotfile": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" - }, - "is-extglob": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" - }, - "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", - "requires": { - "is-extglob": "^1.0.0" - } - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, - "mime-db": { - "version": "1.44.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", - "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" - }, - "mime-types": { - "version": "2.1.27", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", - "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", - "requires": { - "mime-db": "1.44.0" - } - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "parse-glob": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", - "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", - "requires": { - "glob-base": "^0.3.0", - "is-dotfile": "^1.0.0", - "is-extglob": "^1.0.0", - "is-glob": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, - "psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "strip-json-comments": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.0.tgz", - "integrity": "sha512-e6/d0eBu7gHtdCqFt0xJr642LdToM5/cN4Qb9DbHjVx1CP5RyeM+zH7pbecEmDv/lBqb0QH+6Uqq75rxFPkM0w==" - }, - "supports-color": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", - "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", - "requires": { - "has-flag": "^4.0.0" - } - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, - "uri-js": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", - "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", - "requires": { - "punycode": "^2.1.0" - } - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "xml": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/xml/-/xml-1.0.1.tgz", - "integrity": "sha1-eLpyAgApxbyHuKgaPPzXS0ovweU=" - } - } -}