From 0680dd9969cd90873b4f9764e1efb8c6c504828c Mon Sep 17 00:00:00 2001 From: Jared Murrell Date: Fri, 4 Sep 2020 09:22:06 -0400 Subject: [PATCH 01/32] added import-error to the pylint disable rules --- TEMPLATES/.python-lint | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/TEMPLATES/.python-lint b/TEMPLATES/.python-lint index e3d9f5b5..19cc7082 100644 --- a/TEMPLATES/.python-lint +++ b/TEMPLATES/.python-lint @@ -127,7 +127,8 @@ disable=print-statement, next-method-defined, dict-items-not-iterating, dict-keys-not-iterating, - dict-values-not-iterating + dict-values-not-iterating, + import-error # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option From b31b696e00a167ef45bc270861a766a58ff70cbf Mon Sep 17 00:00:00 2001 From: "Goryudyuma(Kei.Matsumoto)" <6211370+Goryudyuma@users.noreply.github.com> Date: Sat, 5 Sep 2020 02:24:06 +0900 Subject: [PATCH 02/32] Just filter the .git folder --- lib/worker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worker.sh b/lib/worker.sh index 7fb995a5..657172f2 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -166,7 +166,7 @@ function LintCodebase() { elif [[ ${FILE} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue - elif [[ ${FILE} == *".git"* ]]; then + elif [[ ${FILE} == *".git" || ${FILE} == *".git/"* ]]; then # This is likely the .git folder and shouldn't be parsed continue elif [[ ${FILE} == *".venv"* ]]; then From 828de134a98547086dc702267c11893e90d408ed Mon Sep 17 00:00:00 2001 From: Lukas Gravley Date: Fri, 4 Sep 2020 13:22:01 -0500 Subject: [PATCH 03/32] this should be right --- lib/worker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worker.sh b/lib/worker.sh index 657172f2..79bbb44a 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -166,7 +166,7 @@ function LintCodebase() { elif [[ ${FILE} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue - elif [[ ${FILE} == *".git" || ${FILE} == *".git/"* ]]; then + elif [[ ${FILE} == *".git/"* ]]; then # This is likely the .git folder and shouldn't be parsed continue elif [[ ${FILE} == *".venv"* ]]; then From c92bc10b8e1a7eb1e8a22d30a3682796bd7efc09 Mon Sep 17 00:00:00 2001 From: Bryan Clark Date: Fri, 4 Sep 2020 14:43:37 -0700 Subject: [PATCH 04/32] Add org.opencontainers.image.source LABEL --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 7b737996..63f6f87f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -44,6 +44,7 @@ LABEL com.github.actions.name="GitHub Super-Linter" \ org.opencontainers.image.version=$BUILD_VERSION \ org.opencontainers.image.authors="GitHub DevOps " \ org.opencontainers.image.url="https://github.com/github/super-linter" \ + org.opencontainers.image.source="https://github.com/github/super-linter" \ org.opencontainers.image.documentation="https://github.com/github/super-linter" \ org.opencontainers.image.vendor="GitHub" \ org.opencontainers.image.description="Lint your code base with GitHub Actions" From f7e6c9c5040d49674045d8d6297a6b2320ec5057 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2020 05:23:45 +0000 Subject: [PATCH 05/32] Bump eslint-plugin-jest from 23.20.0 to 24.0.0 in /dependencies Bumps [eslint-plugin-jest](https://github.com/jest-community/eslint-plugin-jest) from 23.20.0 to 24.0.0. - [Release notes](https://github.com/jest-community/eslint-plugin-jest/releases) - [Changelog](https://github.com/jest-community/eslint-plugin-jest/blob/master/CHANGELOG.md) - [Commits](https://github.com/jest-community/eslint-plugin-jest/compare/v23.20.0...v24.0.0) Signed-off-by: dependabot[bot] --- dependencies/package-lock.json | 59 ++++++++++++++++++++++++++-------- dependencies/package.json | 2 +- 2 files changed, 46 insertions(+), 15 deletions(-) diff --git a/dependencies/package-lock.json b/dependencies/package-lock.json index b121e07e..b3f6c513 100644 --- a/dependencies/package-lock.json +++ b/dependencies/package-lock.json @@ -2296,37 +2296,68 @@ } }, "eslint-plugin-jest": { - "version": "23.20.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-23.20.0.tgz", - "integrity": "sha512-+6BGQt85OREevBDWCvhqj1yYA4+BFK4XnRZSGJionuEYmcglMZYLNNBBemwzbqUAckURaHdJSBcjHPyrtypZOw==", + "version": "24.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-24.0.0.tgz", + "integrity": "sha512-a0G7hSDbuBCW4PNT6MVpAyfnGbUDOqxzOyhR6wT2BIBnR7MhvfAqd6KKfsTjX+Z3gxzIHiEsihzdClU4cSc6qQ==", "requires": { - "@typescript-eslint/experimental-utils": "^2.5.0" + "@typescript-eslint/experimental-utils": "^4.0.1" }, "dependencies": { "@typescript-eslint/experimental-utils": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-2.34.0.tgz", - "integrity": "sha512-eS6FTkq+wuMJ+sgtuNTtcqavWXqsflWcfBnlYhg/nS4aZ1leewkXGbvBhaapn1q6qf4M71bsR1tez5JTRMuqwA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.0.1.tgz", + "integrity": "sha512-gAqOjLiHoED79iYTt3F4uSHrYmg/GPz/zGezdB0jAdr6S6gwNiR/j7cTZ8nREKVzMVKLd9G3xbg1sV9GClW3sw==", "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/typescript-estree": "2.34.0", + "@typescript-eslint/scope-manager": "4.0.1", + "@typescript-eslint/types": "4.0.1", + "@typescript-eslint/typescript-estree": "4.0.1", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, - "@typescript-eslint/typescript-estree": { - "version": "2.34.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-2.34.0.tgz", - "integrity": "sha512-OMAr+nJWKdlVM9LOqCqh3pQQPwxHAN7Du8DR6dmwCrAmxtiXQnhHJ6tBNtf+cggqfo51SG/FCwnKhXCIM7hnVg==", + "@typescript-eslint/scope-manager": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.0.1.tgz", + "integrity": "sha512-u3YEXVJ8jsj7QCJk3om0Y457fy2euEOkkzxIB/LKU3MdyI+FJ2gI0M4aKEaXzwCSfNDiZ13a3lDo5DVozc+XLQ==", "requires": { + "@typescript-eslint/types": "4.0.1", + "@typescript-eslint/visitor-keys": "4.0.1" + } + }, + "@typescript-eslint/types": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.0.1.tgz", + "integrity": "sha512-S+gD3fgbkZYW2rnbjugNMqibm9HpEjqZBZkTiI3PwbbNGWmAcxolWIUwZ0SKeG4Dy2ktpKKaI/6+HGYVH8Qrlg==" + }, + "@typescript-eslint/typescript-estree": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.0.1.tgz", + "integrity": "sha512-zGzleORFXrRWRJAMLTB2iJD1IZbCPkg4hsI8mGdpYlKaqzvKYSEWVAYh14eauaR+qIoZVWrXgYSXqLtTlxotiw==", + "requires": { + "@typescript-eslint/types": "4.0.1", + "@typescript-eslint/visitor-keys": "4.0.1", "debug": "^4.1.1", - "eslint-visitor-keys": "^1.1.0", - "glob": "^7.1.6", + "globby": "^11.0.1", "is-glob": "^4.0.1", "lodash": "^4.17.15", "semver": "^7.3.2", "tsutils": "^3.17.1" } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.0.1.tgz", + "integrity": "sha512-yBSqd6FjnTzbg5RUy9J+9kJEyQjTI34JdGMJz+9ttlJzLCnGkBikxw+N5n2VDcc3CesbIEJ0MnZc5uRYnrEnCw==", + "requires": { + "@typescript-eslint/types": "4.0.1", + "eslint-visitor-keys": "^2.0.0" + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==" } } }, diff --git a/dependencies/package.json b/dependencies/package.json index e00ab0a3..fcbdd5df 100644 --- a/dependencies/package.json +++ b/dependencies/package.json @@ -11,7 +11,7 @@ "eslint": "^7.8.1", "eslint-config-airbnb": "^18.2.0", "eslint-config-prettier": "^6.11.0", - "eslint-plugin-jest": "^23.20.0", + "eslint-plugin-jest": "^24.0.0", "eslint-plugin-prettier": "^3.1.4", "htmlhint": "^0.14.1", "jsonlint": "^1.6.3", From 8e85f7e8c03dcb9dcb6e5c24120df087aba5e82b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 7 Sep 2020 05:24:29 +0000 Subject: [PATCH 06/32] Bump yq from 2.10.1 to 2.11.0 in /dependencies Bumps [yq](https://github.com/kislyuk/yq) from 2.10.1 to 2.11.0. - [Release notes](https://github.com/kislyuk/yq/releases) - [Changelog](https://github.com/kislyuk/yq/blob/develop/Changes.rst) - [Commits](https://github.com/kislyuk/yq/compare/v2.10.1...v2.11.0) Signed-off-by: dependabot[bot] --- dependencies/Pipfile.lock | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/dependencies/Pipfile.lock b/dependencies/Pipfile.lock index 14821409..14332c0e 100644 --- a/dependencies/Pipfile.lock +++ b/dependencies/Pipfile.lock @@ -39,10 +39,10 @@ }, "attrs": { "hashes": [ - "sha256:0ef97238856430dcf9228e07f316aefc17e8939fc8507e18c6501b761ef1a42a", - "sha256:2867b7b9f8326499ab5b0e2d12801fa5c98842d2cbd22b35112ae04bf85b4dff" + "sha256:26b54ddbbb9ee1d34d5d3668dd37d6cf74990ab23c828c2888dccdceee395594", + "sha256:fce7fc47dfc976152e82d53ff92fa0407700c21acd20886a13777a0d20e655dc" ], - "version": "==20.1.0" + "version": "==20.2.0" }, "aws-sam-translator": { "hashes": [ @@ -62,17 +62,17 @@ }, "boto3": { "hashes": [ - "sha256:4196b418598851ffd10cf9d1606694673cbfeca4ddf8b25d4e50addbd2fc60bf", - "sha256:69ad8f2184979e223e12ee3071674fdf910983cf9f4d6f34f7ec407b089064b5" + "sha256:2ab73b0c400ab8c7df84bee7564ef8a0813021da28dd7a05fcbffb77a8ae9de9", + "sha256:bb2222fa02fcd09b39e581e532d4f013ea850742d8cd46e9c10a21028b6d2ef5" ], - "version": "==1.14.54" + "version": "==1.14.56" }, "botocore": { "hashes": [ - "sha256:6fe05837646447d61acdaf1e3401b92cd9309f00b19c577a50d0ade7735a3403", - "sha256:9e493a21e6a8d45c631eb2952ae8e1d0a31b9984546d4268ea10c0c33e2435ce" + "sha256:5a72e1758f3c89c663d74eb733d313f69d059ab4fd571ad41829d666e3367392", + "sha256:73fd22d70611fdcfbb44d1e5f77f7edf8a45a58e6286d50963cc19f9cf9e3e67" ], - "version": "==1.17.54" + "version": "==1.17.56" }, "cfn-lint": { "hashes": [ @@ -114,10 +114,10 @@ }, "isort": { "hashes": [ - "sha256:60a1b97e33f61243d12647aaaa3e6cc6778f5eb9f42997650f1cc975b6008750", - "sha256:d488ba1c5a2db721669cc180180d5acf84ebdc5af7827f7aaeaa75f73cf0e2b8" + "sha256:92533892058de0306e51c88f22ece002a209dc8e80288aa3cec6d443060d584f", + "sha256:a200d47b7ee8b7f7d0a9646650160c4a51b6a91a9413fd31b1da2c4de789f5d3" ], - "version": "==5.4.2" + "version": "==5.5.1" }, "jmespath": { "hashes": [ @@ -373,11 +373,11 @@ }, "yq": { "hashes": [ - "sha256:a876304f2b360a968023eb7d13ec669e102fd381c818783e88e475bd2638d278", - "sha256:f6252a0757d0c2a9e55b4402e176a7e41a99e0e6dd5be4f9d5a4d651eeb4d6c0" + "sha256:8654d8217d98caa4b03bc00a7041b3716e7e6f441516b52a3f7cc91578c1e9be", + "sha256:ffdfdd94629aa6b56f54edeb345795e97f337c83715be0abe8113722f1c1cc57" ], "index": "pypi", - "version": "==2.10.1" + "version": "==2.11.0" } }, "develop": {} From 15eec551175161d40458a2b1fd6a50b79a99b5ff Mon Sep 17 00:00:00 2001 From: kpj Date: Mon, 7 Sep 2020 16:37:22 +0200 Subject: [PATCH 07/32] [Snakemake] Update documentation --- README.md | 2 ++ docs/disabling-linters.md | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 743756aa..c4975e8f 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base | **Raku** | [Raku](https://raku.org) | | **Ruby** | [RuboCop](https://github.com/rubocop-hq/rubocop) | | **Shell** | [Shellcheck](https://github.com/koalaman/shellcheck) / [executable bit check] / [shfmt](https://github.com/mvdan/sh) | +| **Snakemake** | [snakefmt](https://github.com/snakemake/snakefmt/) | | **SQL** | [sql-lint](https://github.com/joereynolds/sql-lint) | | **Terraform** | [tflint](https://github.com/terraform-linters/tflint) / [terrascan](https://github.com/accurics/terrascan) | | **TypeScript** | [eslint](https://eslint.org/) / [standard js](https://standardjs.com/) | @@ -238,6 +239,7 @@ But if you wish to select or exclude specific linters, we give you full control | **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_SHELL_SHFMT** | `true` | Flag to enable or disable the linting process of Shell scripts. (Utilizing: shfmt) | +| **VALIDATE_SNAKEMAKE** | `true` | Flag to enable or disable the linting process of Snakefiles. (Utilizing: snakefmt) | | **VALIDATE_STATES** | `true` | Flag to enable or disable the linting process for AWS States Language. | | **VALIDATE_SQL** | `true` | Flag to enable or disable the linting process of the SQL language. | | **VALIDATE_TERRAFORM** | `true` | Flag to enable or disable the linting process of the Terraform language. | diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 16100f5d..9c4447e2 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -48,6 +48,7 @@ For some linters it is also possible to override rules on a case by case level w - [Raku](#raku) - [Ruby](#ruby) - [Shell](#shell) + - [Snakemake](#snakemake) - [SQL](#sql) - [Terraform](#terraform) - [Typescript eslint](#typescript-eslint) @@ -1120,6 +1121,16 @@ shfmt [supports EditorConfig files for configuration](https://github.com/mvdan/s --- +## Snakemake + +- [snakefmt](https://github.com/snakemake/snakefmt/) + +### snakefmt configuration + +- Check the repository's README + +--- + ## SQL - [SQL](https://www.npmjs.com/package/sql-lint) From 1e453be7fa22a2df9c4858b0dc5e22ef544b422f Mon Sep 17 00:00:00 2001 From: kpj Date: Mon, 7 Sep 2020 16:49:07 +0200 Subject: [PATCH 08/32] [Snakemake] Update codebase --- .github/linters/.snakefmt.toml | 0 Dockerfile | 1 + TEMPLATES/.snakefmt.toml | 0 lib/buildFileList.sh | 13 +++++++++++++ lib/linter.sh | 14 ++++++++++++++ 5 files changed, 28 insertions(+) create mode 100644 .github/linters/.snakefmt.toml create mode 100644 TEMPLATES/.snakefmt.toml diff --git a/.github/linters/.snakefmt.toml b/.github/linters/.snakefmt.toml new file mode 100644 index 00000000..e69de29b diff --git a/Dockerfile b/Dockerfile index 7b737996..e0fcaafa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -380,6 +380,7 @@ ENV ACTIONS_RUNNER_DEBUG=${ACTIONS_RUNNER_DEBUG} \ VALIDATE_RAKU=${VALIDATE_RAKU} \ VALIDATE_RUBY=${VALIDATE_RUBY} \ VALIDATE_SHELL_SHFMT=${VALIDATE_SHELL_SHFMT} \ + VALIDATE_SNAKEMAKE=${VALIDATE_SNAKEMAKE} \ VALIDATE_STATES=${VALIDATE_STATES} \ VALIDATE_SQL=${VALIDATE_SQL} \ VALIDATE_TERRAFORM=${VALIDATE_TERRAFORM} \ diff --git a/TEMPLATES/.snakefmt.toml b/TEMPLATES/.snakefmt.toml new file mode 100644 index 00000000..e69de29b diff --git a/lib/buildFileList.sh b/lib/buildFileList.sh index 13371ef6..a8452a2f 100755 --- a/lib/buildFileList.sh +++ b/lib/buildFileList.sh @@ -484,6 +484,19 @@ function BuildFileList() { ########################################################## READ_ONLY_CHANGE_FLAG=1 + ########################### + # Get the SNAKEMAKE files # + ########################### + elif [ "${FILE_TYPE}" == "smk" ]; then + ################################ + # Append the file to the array # + ################################ + FILE_ARRAY_SNAKEMAKE+=("${FILE}") + ########################################################## + # Set the READ_ONLY_CHANGE_FLAG since this could be exec # + ########################################################## + READ_ONLY_CHANGE_FLAG=1 + ##################### # Get the SQL files # ##################### diff --git a/lib/linter.sh b/lib/linter.sh index 78d2f5bf..11bc1f43 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -207,6 +207,7 @@ VALIDATE_RAKU="${VALIDATE_RAKU}" # Boolean t VALIDATE_RUBY="${VALIDATE_RUBY}" # Boolean to validate language VALIDATE_STATES="${VALIDATE_STATES}" # Boolean to validate language VALIDATE_SHELL_SHFMT="${VALIDATE_SHELL_SHFMT}" # Boolean to check Shell files against editorconfig +VALIDATE_SNAKEMAKE="${VALIDATE_SNAKEMAKE}" # Boolean to check Snakefiles VALIDATE_SQL="${VALIDATE_SQL}" # Boolean to validate language VALIDATE_TERRAFORM="${VALIDATE_TERRAFORM}" # Boolean to validate language VALIDATE_TERRAFORM_TERRASCAN="${VALIDATE_TERRAFORM_TERRASCAN}" # Boolean to validate language @@ -1846,6 +1847,19 @@ if [ "${VALIDATE_SHELL_SHFMT}" == "true" ]; then fi fi +##################### +# SNAKEMAKE LINTING # +##################### +if [ "${VALIDATE_SNAKEMAKE}" == "true" ]; then + ################################ + # Lint the files with snakefmt # + ################################ + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "SNAKEMAKE" "snakefmt" "snakefmt --diff" ".*\.\(smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" + + # TODO: add --config +fi + ###################### # AWS STATES LINTING # ###################### From ea5d4aa2a1ef83b64925ab688c8797d8d8d8e50c Mon Sep 17 00:00:00 2001 From: kpj Date: Mon, 7 Sep 2020 16:55:06 +0200 Subject: [PATCH 09/32] [Snakemake] Update test cases --- .automation/test/snakemake/README.md | 19 +++++++++++++++++++ .../test/snakemake/snakemake_bad_1.smk | 12 ++++++++++++ .../test/snakemake/snakemake_good_1.smk | 12 ++++++++++++ 3 files changed, 43 insertions(+) create mode 100644 .automation/test/snakemake/README.md create mode 100644 .automation/test/snakemake/snakemake_bad_1.smk create mode 100644 .automation/test/snakemake/snakemake_good_1.smk diff --git a/.automation/test/snakemake/README.md b/.automation/test/snakemake/README.md new file mode 100644 index 00000000..e25faf23 --- /dev/null +++ b/.automation/test/snakemake/README.md @@ -0,0 +1,19 @@ +# Snakemake test cases + +This folder holds the test cases for **Snakemake**. + +## 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/snakemake/snakemake_bad_1.smk b/.automation/test/snakemake/snakemake_bad_1.smk new file mode 100644 index 00000000..abf043e7 --- /dev/null +++ b/.automation/test/snakemake/snakemake_bad_1.smk @@ -0,0 +1,12 @@ +rule all: + input: + file1='result.txt', + + +rule simulation: + output: + file1="result.txt" + shell: + """ + touch {output} + """ diff --git a/.automation/test/snakemake/snakemake_good_1.smk b/.automation/test/snakemake/snakemake_good_1.smk new file mode 100644 index 00000000..7c809a89 --- /dev/null +++ b/.automation/test/snakemake/snakemake_good_1.smk @@ -0,0 +1,12 @@ +rule all: + input: + file1="result.txt", + + +rule simulation: + output: + file1="result.txt", + shell: + """ + touch {output} + """ From 34e9e574197e30c6ad59f0c87a68388da957e5b9 Mon Sep 17 00:00:00 2001 From: kpj Date: Mon, 7 Sep 2020 17:01:19 +0200 Subject: [PATCH 10/32] [Snakemake] Add another issue to bad test case --- .automation/test/snakemake/snakemake_bad_1.smk | 1 - 1 file changed, 1 deletion(-) diff --git a/.automation/test/snakemake/snakemake_bad_1.smk b/.automation/test/snakemake/snakemake_bad_1.smk index abf043e7..6a8a9592 100644 --- a/.automation/test/snakemake/snakemake_bad_1.smk +++ b/.automation/test/snakemake/snakemake_bad_1.smk @@ -2,7 +2,6 @@ rule all: input: file1='result.txt', - rule simulation: output: file1="result.txt" From 2d7ba8d26bf3ffd99aecc53e220a8f11874ecda3 Mon Sep 17 00:00:00 2001 From: kpj Date: Mon, 7 Sep 2020 17:12:44 +0200 Subject: [PATCH 11/32] [Snakemake] Add 'snakefmt' to dependencies --- dependencies/Pipfile | 1 + dependencies/Pipfile.lock | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/dependencies/Pipfile b/dependencies/Pipfile index a935ed23..505058b6 100644 --- a/dependencies/Pipfile +++ b/dependencies/Pipfile @@ -10,6 +10,7 @@ black = "*" cfn-lint = "*" flake8 = "*" pylint = "*" +snakefmt = "*" yamllint = "*" yq = "*" diff --git a/dependencies/Pipfile.lock b/dependencies/Pipfile.lock index 14821409..8eadc0b9 100644 --- a/dependencies/Pipfile.lock +++ b/dependencies/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "1f2a4e188bcf058f78905dbe7c959b9a801148e39a69e86d6a795b45a65b7af9" + "sha256": "de596e01dfe786913639a851aa16e92f004400efe714dee242cc79c10e9f7cda" }, "pipfile-spec": 6, "requires": { @@ -301,6 +301,14 @@ ], "version": "==1.15.0" }, + "snakefmt": { + "hashes": [ + "sha256:550b893d0b115adf73e3fc0acee5960f047b5e2c3ca5bbda31ba83f9d594c931", + "sha256:e6612968c3cb98e204449a5d7ad01359ef46da3e1c41bffbda39fe0e253c0c5e" + ], + "index": "pypi", + "version": "==0.1.4" + }, "toml": { "hashes": [ "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f", From 0c5029bf673122d9c8e9c7a72a12d8a6017ba806 Mon Sep 17 00:00:00 2001 From: kpj Date: Mon, 7 Sep 2020 17:20:56 +0200 Subject: [PATCH 12/32] [Snakemake] Actually run 'snakefmt' tests --- lib/worker.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/worker.sh b/lib/worker.sh index 7fb995a5..5437f479 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -702,6 +702,7 @@ function RunTestCases() { TestCodebase "RAKU" "raku" "raku -c" ".*\.\(raku\|rakumod\|rakutest\|pm6\|pl6\|p6\)\$" "raku" TestCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES}" ".*\.\(rb\)\$" "ruby" TestCodebase "SHELL_SHFMT" "shfmt" "shfmt -d" ".*\.\(sh\|bash\|dash\|ksh\)\$" "shell_shfmt" + TestCodebase "SNAKEMAKE" "snakefmt" "snakefmt --diff" ".*\.\(smk\)\$" "snakemake" TestCodebase "STATES" "asl-validator" "asl-validator --json-path" ".*\.\(json\)\$" "states" TestCodebase "SQL" "sql-lint" "sql-lint --config ${SQL_LINTER_RULES}" ".*\.\(sql\)\$" "sql" TestCodebase "TERRAFORM" "tflint" "tflint -c ${TERRAFORM_LINTER_RULES}" ".*\.\(tf\)\$" "terraform" From 53f551c8b0240861ff337007095bf98bf4933e44 Mon Sep 17 00:00:00 2001 From: kpj Date: Mon, 7 Sep 2020 17:26:58 +0200 Subject: [PATCH 13/32] [Snakemake] Add '--config' parameter to 'snakefmt' calls --- lib/linter.sh | 7 ++++--- lib/worker.sh | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index 11bc1f43..0d098509 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -118,6 +118,9 @@ R_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${R_FILE_NAME}" # 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 +# Snakemake Vars +SNAKEMAKE_FILE_NAME="${SNAKEMAKE_CONFIG_FILE:-.snakefmt.toml}" +SNAKEMAKE_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${SNAKEMAKE_FILE_NAME}" # SQL Vars SQL_FILE_NAME=".sql-config.json" # Name of the file SQL_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${SQL_FILE_NAME}" # Path to the SQL lint rules @@ -1855,9 +1858,7 @@ if [ "${VALIDATE_SNAKEMAKE}" == "true" ]; then # Lint the files with snakefmt # ################################ # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "SNAKEMAKE" "snakefmt" "snakefmt --diff" ".*\.\(smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" - - # TODO: add --config + LintCodebase "SNAKEMAKE" "snakefmt" "snakefmt --config ${SNAKEMAKE_LINTER_RULES} --diff" ".*\.\(smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" fi ###################### diff --git a/lib/worker.sh b/lib/worker.sh index 5437f479..fcaf6acd 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -702,7 +702,7 @@ function RunTestCases() { TestCodebase "RAKU" "raku" "raku -c" ".*\.\(raku\|rakumod\|rakutest\|pm6\|pl6\|p6\)\$" "raku" TestCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES}" ".*\.\(rb\)\$" "ruby" TestCodebase "SHELL_SHFMT" "shfmt" "shfmt -d" ".*\.\(sh\|bash\|dash\|ksh\)\$" "shell_shfmt" - TestCodebase "SNAKEMAKE" "snakefmt" "snakefmt --diff" ".*\.\(smk\)\$" "snakemake" + TestCodebase "SNAKEMAKE" "snakefmt" "snakefmt --config ${SNAKEMAKE_LINTER_RULES} --diff" ".*\.\(smk\)\$" "snakemake" TestCodebase "STATES" "asl-validator" "asl-validator --json-path" ".*\.\(json\)\$" "states" TestCodebase "SQL" "sql-lint" "sql-lint --config ${SQL_LINTER_RULES}" ".*\.\(sql\)\$" "sql" TestCodebase "TERRAFORM" "tflint" "tflint -c ${TERRAFORM_LINTER_RULES}" ".*\.\(tf\)\$" "terraform" From 8cd7dfabd74ad402c55191677b75854fbee2131b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Sep 2020 05:40:49 +0000 Subject: [PATCH 14/32] Bump golangci/golangci-lint from v1.30.0 to v1.31.0 Bumps golangci/golangci-lint from v1.30.0 to v1.31.0. Signed-off-by: dependabot[bot] --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7b737996..d328b519 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,7 +10,7 @@ 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.30.0 as golangci-lint +FROM golangci/golangci-lint:v1.31.0 as golangci-lint FROM yoheimuta/protolint:v0.26.0 as protolint FROM koalaman/shellcheck:v0.7.1 as shellcheck FROM wata727/tflint:0.19.1 as tflint From 901645f6495ccc54601dedcdeadfde7a1272ed80 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 8 Sep 2020 05:41:33 +0000 Subject: [PATCH 15/32] Bump npm-groovy-lint from 7.5.4 to 7.6.1 in /dependencies Bumps [npm-groovy-lint](https://github.com/nvuillam/npm-groovy-lint) from 7.5.4 to 7.6.1. - [Release notes](https://github.com/nvuillam/npm-groovy-lint/releases) - [Changelog](https://github.com/nvuillam/npm-groovy-lint/blob/master/CHANGELOG.md) - [Commits](https://github.com/nvuillam/npm-groovy-lint/compare/v7.5.4...v7.6.1) Signed-off-by: dependabot[bot] --- dependencies/package-lock.json | 14 +++++++------- dependencies/package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dependencies/package-lock.json b/dependencies/package-lock.json index b121e07e..be998171 100644 --- a/dependencies/package-lock.json +++ b/dependencies/package-lock.json @@ -3376,9 +3376,9 @@ "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, "java-caller": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/java-caller/-/java-caller-2.2.2.tgz", - "integrity": "sha512-rK9ghUptfHflb3KDFOMBj/mCai2fp2Y/ebdNPoseQkSG0GySoy+sX8gn3S4tR1H6y0wRLNvRHjWtdjra4i0CGg==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/java-caller/-/java-caller-2.2.3.tgz", + "integrity": "sha512-NHOO3UVafHZaMK8QPgOM5Ge5VGa/7kNVv2OLJefXovcf3dNAo6eZLWa+Eu2lthp5TOYf+s2olzoK67qTgupmaA==", "requires": { "debug": "^4.1.1", "fs-extra": "^9.0.1", @@ -4054,9 +4054,9 @@ "integrity": "sha1-0LFF62kRicY6eNIB3E/bEpPvDAM=" }, "npm-groovy-lint": { - "version": "7.5.4", - "resolved": "https://registry.npmjs.org/npm-groovy-lint/-/npm-groovy-lint-7.5.4.tgz", - "integrity": "sha512-ShDRyW0s4z3OXrz2jSfLqiI7n8Iqvh8XtpBUS2vlX4CgL65IBk5rIt2swQOUL/UWUt3BTUg509ACzhD2g3arJA==", + "version": "7.6.1", + "resolved": "https://registry.npmjs.org/npm-groovy-lint/-/npm-groovy-lint-7.6.1.tgz", + "integrity": "sha512-JPbBejvEjH08QlyLGOU+IMcUS8HuIAk8Z/6onL9u3ToTSWzZTlVPYrPpAxem2cpsh6MvwUwgK4QowB3icxkuew==", "requires": { "amplitude": "^5.1.2", "ansi-colors": "^4.1.1", @@ -4070,7 +4070,7 @@ "glob": "^7.1.6", "import-fresh": "^3.2.1", "ip": "^1.1.5", - "java-caller": "^2.2.2", + "java-caller": "^2.2.3", "optionator": "^0.8.3", "semver": "^7.1.3", "strip-json-comments": "^3.0.1", diff --git a/dependencies/package.json b/dependencies/package.json index e00ab0a3..12ff211b 100644 --- a/dependencies/package.json +++ b/dependencies/package.json @@ -16,7 +16,7 @@ "htmlhint": "^0.14.1", "jsonlint": "^1.6.3", "markdownlint-cli": "^0.23.2", - "npm-groovy-lint": "^7.5.4", + "npm-groovy-lint": "^7.6.1", "prettier": "^2.1.1", "prettyjson": "^1.2.1", "sql-lint": "0.0.15", From ad262196ba81c0702447e0294c1c5c75d7ddebfe Mon Sep 17 00:00:00 2001 From: kpj Date: Tue, 8 Sep 2020 09:11:54 +0200 Subject: [PATCH 16/32] [Snakemake] Also lint 'Snakefile' (without '.smk' suffix) --- lib/linter.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linter.sh b/lib/linter.sh index 0d098509..03c094b7 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1858,7 +1858,7 @@ if [ "${VALIDATE_SNAKEMAKE}" == "true" ]; then # Lint the files with snakefmt # ################################ # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "SNAKEMAKE" "snakefmt" "snakefmt --config ${SNAKEMAKE_LINTER_RULES} --diff" ".*\.\(smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" + LintCodebase "SNAKEMAKE" "snakefmt" "snakefmt --config ${SNAKEMAKE_LINTER_RULES} --diff" "\(Snakefile|.*\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" fi ###################### From 8ac1c99a2e5d1fa498a07f9734b2ac321a53429c Mon Sep 17 00:00:00 2001 From: kpj Date: Tue, 8 Sep 2020 09:38:48 +0200 Subject: [PATCH 17/32] [Snakemake] Support both formatting using 'snakefmt' and linting using 'snakemake --lint' --- .../test/snakemake/snakemake_good_1.smk | 4 + Dockerfile | 3 +- README.md | 5 +- dependencies/Pipfile | 1 + dependencies/Pipfile.lock | 241 +++++++++++++++--- docs/disabling-linters.md | 5 + lib/linter.sh | 26 +- lib/worker.sh | 3 +- 8 files changed, 246 insertions(+), 42 deletions(-) diff --git a/.automation/test/snakemake/snakemake_good_1.smk b/.automation/test/snakemake/snakemake_good_1.smk index 7c809a89..e4b362eb 100644 --- a/.automation/test/snakemake/snakemake_good_1.smk +++ b/.automation/test/snakemake/snakemake_good_1.smk @@ -6,6 +6,10 @@ rule all: rule simulation: output: file1="result.txt", + log: + "logs/simulation.log", + conda: + "envs/simulation.yml" shell: """ touch {output} diff --git a/Dockerfile b/Dockerfile index e0fcaafa..e3102c3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -380,7 +380,8 @@ ENV ACTIONS_RUNNER_DEBUG=${ACTIONS_RUNNER_DEBUG} \ VALIDATE_RAKU=${VALIDATE_RAKU} \ VALIDATE_RUBY=${VALIDATE_RUBY} \ VALIDATE_SHELL_SHFMT=${VALIDATE_SHELL_SHFMT} \ - VALIDATE_SNAKEMAKE=${VALIDATE_SNAKEMAKE} \ + VALIDATE_SNAKEMAKE_LINT=${VALIDATE_SNAKEMAKE_LINT} \ + VALIDATE_SNAKEMAKE_SNAKEFMT=${VALIDATE_SNAKEMAKE_SNAKEFMT} \ VALIDATE_STATES=${VALIDATE_STATES} \ VALIDATE_SQL=${VALIDATE_SQL} \ VALIDATE_TERRAFORM=${VALIDATE_TERRAFORM} \ diff --git a/README.md b/README.md index c4975e8f..29f73666 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Developers on **GitHub** can call the **GitHub Action** to lint their code base | **Raku** | [Raku](https://raku.org) | | **Ruby** | [RuboCop](https://github.com/rubocop-hq/rubocop) | | **Shell** | [Shellcheck](https://github.com/koalaman/shellcheck) / [executable bit check] / [shfmt](https://github.com/mvdan/sh) | -| **Snakemake** | [snakefmt](https://github.com/snakemake/snakefmt/) | +| **Snakemake** | [snakefmt](https://github.com/snakemake/snakefmt/) / [snakemake --lint](https://snakemake.readthedocs.io/en/stable/snakefiles/writing_snakefiles.html#best-practices) | | **SQL** | [sql-lint](https://github.com/joereynolds/sql-lint) | | **Terraform** | [tflint](https://github.com/terraform-linters/tflint) / [terrascan](https://github.com/accurics/terrascan) | | **TypeScript** | [eslint](https://eslint.org/) / [standard js](https://standardjs.com/) | @@ -239,7 +239,8 @@ But if you wish to select or exclude specific linters, we give you full control | **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_SHELL_SHFMT** | `true` | Flag to enable or disable the linting process of Shell scripts. (Utilizing: shfmt) | -| **VALIDATE_SNAKEMAKE** | `true` | Flag to enable or disable the linting process of Snakefiles. (Utilizing: snakefmt) | +| **VALIDATE_SNAKEMAKE_LINT** | `true` | Flag to enable or disable the linting process of Snakefiles. (Utilizing: snakemake --lint) | +| **VALIDATE_SNAKEMAKE_SNAKEFMT** | `true` | Flag to enable or disable the linting process of Snakefiles. (Utilizing: snakefmt) | | **VALIDATE_STATES** | `true` | Flag to enable or disable the linting process for AWS States Language. | | **VALIDATE_SQL** | `true` | Flag to enable or disable the linting process of the SQL language. | | **VALIDATE_TERRAFORM** | `true` | Flag to enable or disable the linting process of the Terraform language. | diff --git a/dependencies/Pipfile b/dependencies/Pipfile index 505058b6..7a0da828 100644 --- a/dependencies/Pipfile +++ b/dependencies/Pipfile @@ -11,6 +11,7 @@ cfn-lint = "*" flake8 = "*" pylint = "*" snakefmt = "*" +snakemake = "*" yamllint = "*" yq = "*" diff --git a/dependencies/Pipfile.lock b/dependencies/Pipfile.lock index 8eadc0b9..d53e2656 100644 --- a/dependencies/Pipfile.lock +++ b/dependencies/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "de596e01dfe786913639a851aa16e92f004400efe714dee242cc79c10e9f7cda" + "sha256": "db425ed57eee9f33aae7341acbde447b5170e9cbdb3bd360794c4ce4f3944c5c" }, "pipfile-spec": 6, "requires": { @@ -16,6 +16,13 @@ ] }, "default": { + "amply": { + "hashes": [ + "sha256:6e5d53af62772790ba82a989a3de72b8ce5c1cd809613c06f7cb061f7ec34dc8", + "sha256:c93da6113cac809487abc6565f41e37b9b8a5d469dcfaf4443d8d35befb181af" + ], + "version": "==0.1.2" + }, "appdirs": { "hashes": [ "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41", @@ -35,14 +42,16 @@ "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703", "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386" ], + "markers": "python_version >= '3.5'", "version": "==2.4.2" }, "attrs": { "hashes": [ - "sha256:0ef97238856430dcf9228e07f316aefc17e8939fc8507e18c6501b761ef1a42a", - "sha256:2867b7b9f8326499ab5b0e2d12801fa5c98842d2cbd22b35112ae04bf85b4dff" + "sha256:26b54ddbbb9ee1d34d5d3668dd37d6cf74990ab23c828c2888dccdceee395594", + "sha256:fce7fc47dfc976152e82d53ff92fa0407700c21acd20886a13777a0d20e655dc" ], - "version": "==20.1.0" + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==20.2.0" }, "aws-sam-translator": { "hashes": [ @@ -54,25 +63,32 @@ }, "black": { "hashes": [ - "sha256:1c02557aa099101b9d21496f8a914e9ed2222ef70336404eeeac8edba836fbea", - "sha256:70b62ef1527c950db59062cda342ea224d772abdf6adc58b86a45421bab20a6b" + "sha256:1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b", + "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539" ], "index": "pypi", - "version": "==20.8b1" + "version": "==19.10b0" }, "boto3": { "hashes": [ - "sha256:4196b418598851ffd10cf9d1606694673cbfeca4ddf8b25d4e50addbd2fc60bf", - "sha256:69ad8f2184979e223e12ee3071674fdf910983cf9f4d6f34f7ec407b089064b5" + "sha256:2ab73b0c400ab8c7df84bee7564ef8a0813021da28dd7a05fcbffb77a8ae9de9", + "sha256:bb2222fa02fcd09b39e581e532d4f013ea850742d8cd46e9c10a21028b6d2ef5" ], - "version": "==1.14.54" + "version": "==1.14.56" }, "botocore": { "hashes": [ - "sha256:6fe05837646447d61acdaf1e3401b92cd9309f00b19c577a50d0ade7735a3403", - "sha256:9e493a21e6a8d45c631eb2952ae8e1d0a31b9984546d4268ea10c0c33e2435ce" + "sha256:5a72e1758f3c89c663d74eb733d313f69d059ab4fd571ad41829d666e3367392", + "sha256:73fd22d70611fdcfbb44d1e5f77f7edf8a45a58e6286d50963cc19f9cf9e3e67" ], - "version": "==1.17.54" + "version": "==1.17.56" + }, + "certifi": { + "hashes": [ + "sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3", + "sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41" + ], + "version": "==2020.6.20" }, "cfn-lint": { "hashes": [ @@ -82,13 +98,58 @@ "index": "pypi", "version": "==0.35.1" }, + "chardet": { + "hashes": [ + "sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae", + "sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691" + ], + "version": "==3.0.4" + }, "click": { "hashes": [ "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a", "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", "version": "==7.1.2" }, + "configargparse": { + "hashes": [ + "sha256:edd17be986d5c1ba2e307150b8e5f5107aba125f3574dddd02c85d5cdcfd37dc" + ], + "version": "==1.2.3" + }, + "datrie": { + "hashes": [ + "sha256:0e3b76676abbae2368cce6bf605bb0ba7cfd11f2c420b96d67959f353d5d423f", + "sha256:25e9e07ecfceaef78d23bde8d7278e4d6f63e1e3dc5ac00ccb4bec3062f0a8e0", + "sha256:2de594d84a2f43a09ddc15316a8afd48aae0fdc456f9279d0940aa59c473d9d5", + "sha256:31e316ba305cdd7b8a42f8e4af5a0a15a628aee270d2f392c41329a709eeda6d", + "sha256:327d9c17efaebc66d1956dca047b76fdd0e5b989d63cb55b9038ec09d8769089", + "sha256:3a3e360a765cc95410898dc222f8585ea1b1bba0538a1af4d8630a5bc3ad6ee7", + "sha256:525b08f638d5cf6115df6ccd818e5a01298cd230b2dac91c8ff2e6499d18765d", + "sha256:53969643e2794c37f024d5edaa42d5e6e2627d9937ddcc18d99128e9df700e4c", + "sha256:651c63325056347b86c5de7ffeea8529230a5787c61ee6dcabc5b6c644bd3252", + "sha256:67603594f5db5c0029b1cf86a08e89cde015fe64cf0c4ae4e539c61114396729", + "sha256:6c9b333035312b79e6e9a10356d033e3d29aadbae6365007f706c854b3a94674", + "sha256:89ff3d41df4f899387aa07b4b066f5da36e3a10b67b8aeae631c950502ff4503", + "sha256:b07bd5fdfc3399a6dab86d6e35c72b1dbd598e80c97509c7c7518ab8774d3fda", + "sha256:b2d80fa687173cb8f8bae224ef00d1ad6bda8f8597bbb1a63f85182c7d91aeb3", + "sha256:b6fd6c7c149b410a87d46072c1c98f6e87ec557802e1d0e09db7b858746e8550", + "sha256:bf5c956c0a9a9d0f07e3c8923746279171096de18a8a51685e22d9817f8755a6", + "sha256:bf9f34f7c63797219b32713b561c4f94e777ff6c22beecfcd6bdf6b6c25b8518", + "sha256:c783e2c1e28964b2b045a951eb9606833a188c4bd4a780da68d22f557e03e429", + "sha256:dbe04704eb41b8440ca61416d3670ca6ddeea847d19731cf121889bac2962d07", + "sha256:e0582435a4adef1a2fce53aeedb656bf769b0f113b524f98be51d3e3d40720cb", + "sha256:e1d704ee4fdc03f02d7dacc4d92052dbd490dba551509fccfd8ee52c9039d4ad", + "sha256:ee7cd8470a982356e104e62148f2dbe2d3e17545cafaa3ada29f2548984f1e89", + "sha256:f61cf2726f04c08828bfb4e7af698b0b16bdf2777c3993d042f2898b8e118f21", + "sha256:f826e843138698501cbf1a21233f724b851b1e475fad532b638ac5904e115f10", + "sha256:fa9f39ac88dc6286672b9dd286fe459646da48133c877a927af24803eaea441e" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==0.8.2" + }, "decorator": { "hashes": [ "sha256:41fa54c2a0cc4ba648be4fd43cff00aedf5b9465c9bf18d64325bc225f08f760", @@ -102,6 +163,7 @@ "sha256:9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827", "sha256:a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.15.2" }, "flake8": { @@ -112,18 +174,51 @@ "index": "pypi", "version": "==3.8.3" }, + "gitdb": { + "hashes": [ + "sha256:91f36bfb1ab7949b3b40e23736db18231bf7593edada2ba5c3a174a7b23657ac", + "sha256:c9e1f2d0db7ddb9a704c2a0217be31214e91a4fe1dea1efad19ae42ba0c285c9" + ], + "markers": "python_version >= '3.4'", + "version": "==4.0.5" + }, + "gitpython": { + "hashes": [ + "sha256:080bf8e2cf1a2b907634761c2eaefbe83b69930c94c66ad11b65a8252959f912", + "sha256:1858f4fd089abe92ae465f01d5aaaf55e937eca565fb2c1fce35a51b5f85c910" + ], + "markers": "python_version >= '3.4'", + "version": "==3.1.8" + }, + "idna": { + "hashes": [ + "sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6", + "sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.10" + }, + "ipython-genutils": { + "hashes": [ + "sha256:72dd37233799e619666c9f639a9da83c34013a73e8bbc79a7a6348d93c61fab8", + "sha256:eb2e116e75ecef9d4d228fdc66af54269afa26ab4463042e33785b887c628ba8" + ], + "version": "==0.2.0" + }, "isort": { "hashes": [ - "sha256:60a1b97e33f61243d12647aaaa3e6cc6778f5eb9f42997650f1cc975b6008750", - "sha256:d488ba1c5a2db721669cc180180d5acf84ebdc5af7827f7aaeaa75f73cf0e2b8" + "sha256:92533892058de0306e51c88f22ece002a209dc8e80288aa3cec6d443060d584f", + "sha256:a200d47b7ee8b7f7d0a9646650160c4a51b6a91a9413fd31b1da2c4de789f5d3" ], - "version": "==5.4.2" + "markers": "python_version >= '3.6' and python_version < '4.0'", + "version": "==5.5.1" }, "jmespath": { "hashes": [ "sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9", "sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==0.10.0" }, "jsonpatch": { @@ -139,6 +234,7 @@ "sha256:c192ba86648e05fdae4f08a17ec25180a9aef5008d973407b581798a83975362", "sha256:ff379fa021d1b81ab539f5ec467c7745beb1a5671463f9dcc2b2d458bd361c1e" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.0" }, "jsonschema": { @@ -154,6 +250,14 @@ ], "version": "==1.9" }, + "jupyter-core": { + "hashes": [ + "sha256:394fd5dd787e7c8861741880bdf8a00ce39f95de5d18e579c74b882522219e7e", + "sha256:a4ee613c060fe5697d913416fc9d553599c05e4492d58fac1192c9a6844abb21" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==4.6.3" + }, "lazy-object-proxy": { "hashes": [ "sha256:0c4b206227a8097f05c4dbdd323c50edf81f15db3b8dc064d08c62d37e1a504d", @@ -178,6 +282,7 @@ "sha256:efa1909120ce98bbb3777e8b6f92237f5d5c8ea6758efea36a473e1d38f7d3e4", "sha256:f3900e8a5de27447acbf900b4750b0ddfd7ec1ea7fbaf11dfa911141bc522af0" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.4.3" }, "mccabe": { @@ -187,12 +292,13 @@ ], "version": "==0.6.1" }, - "mypy-extensions": { + "nbformat": { "hashes": [ - "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d", - "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8" + "sha256:54d4d6354835a936bad7e8182dcd003ca3dc0cedfee5a306090e04854343b340", + "sha256:ea55c9b817855e2dfcd3f66d74857342612a60b1f09653440f4a5845e6e3523f" ], - "version": "==0.4.3" + "markers": "python_version >= '3.5'", + "version": "==5.0.7" }, "networkx": { "hashes": [ @@ -209,11 +315,36 @@ ], "version": "==0.8.0" }, + "psutil": { + "hashes": [ + "sha256:0ee3c36428f160d2d8fce3c583a0353e848abb7de9732c50cf3356dd49ad63f8", + "sha256:10512b46c95b02842c225f58fa00385c08fa00c68bac7da2d9a58ebe2c517498", + "sha256:4080869ed93cce662905b029a1770fe89c98787e543fa7347f075ade761b19d6", + "sha256:5e9d0f26d4194479a13d5f4b3798260c20cecf9ac9a461e718eb59ea520a360c", + "sha256:66c18ca7680a31bf16ee22b1d21b6397869dda8059dbdb57d9f27efa6615f195", + "sha256:68d36986ded5dac7c2dcd42f2682af1db80d4bce3faa126a6145c1637e1b559f", + "sha256:90990af1c3c67195c44c9a889184f84f5b2320dce3ee3acbd054e3ba0b4a7beb", + "sha256:a5b120bb3c0c71dfe27551f9da2f3209a8257a178ed6c628a819037a8df487f1", + "sha256:d8a82162f23c53b8525cf5f14a355f5d1eea86fa8edde27287dd3a98399e4fdf", + "sha256:f2018461733b23f308c298653c8903d32aaad7873d25e1d228765e91ae42c3f2", + "sha256:ff1977ba1a5f71f89166d5145c3da1cea89a0fdb044075a12c720ee9123ec818" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==5.7.2" + }, + "pulp": { + "hashes": [ + "sha256:1953894015ed3b9dfefea14a2fba1deef4b47138ef847d05c66ef9806f9fc3b4", + "sha256:9d8ecf532868cc31fa9ff59ee5d5b2049600c5c902c18c794a2bad677c1f92e5" + ], + "version": "==2.3" + }, "pycodestyle": { "hashes": [ "sha256:2295e7b2f6b5bd100585ebcb1f616591b652db8a741695b3d8f5d28bdc934367", "sha256:c58a7d2815e0e8d7972bf1803331fb0152f867bd89adf8a01dfd55085434192e" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.6.0" }, "pyflakes": { @@ -221,6 +352,7 @@ "sha256:0d94e0e05a19e57a99444b6ddcf9a6eb2e5c68d3ca1e98e90707af8152c90a92", "sha256:35b2d75ee967ea93b55750aa9edbbf72813e06a66ba54438df2cfac9e3c27fc8" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.2.0" }, "pylint": { @@ -231,6 +363,14 @@ "index": "pypi", "version": "==2.6.0" }, + "pyparsing": { + "hashes": [ + "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", + "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.4.7" + }, "pyrsistent": { "hashes": [ "sha256:28669905fe725965daa16184933676547c5bb40a5153055a8dee2a4bd7933ad3" @@ -242,6 +382,7 @@ "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==2.8.1" }, "pyyaml": { @@ -261,6 +402,13 @@ "markers": "python_version != '3.4'", "version": "==5.3.1" }, + "ratelimiter": { + "hashes": [ + "sha256:5c395dcabdbbde2e5178ef3f89b568a3066454a6ddc223b76473dac22f89b4f7", + "sha256:a52be07bc0bb0b3674b4b304550f10c769bbb00fead3072e035904474259809f" + ], + "version": "==1.2.0.post0" + }, "regex": { "hashes": [ "sha256:0dc64ee3f33cd7899f79a8d788abfbec168410be356ed9bd30bbd3f0a23a7204", @@ -287,6 +435,14 @@ ], "version": "==2020.7.14" }, + "requests": { + "hashes": [ + "sha256:b3559a131db72c33ee969480840fff4bb6dd111de7dd27c8ee1f820f4f00231b", + "sha256:fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4'", + "version": "==2.24.0" + }, "s3transfer": { "hashes": [ "sha256:2482b4259524933a022d59da830f51bd746db62f047d6eb213f2f8855dcb8a13", @@ -299,8 +455,17 @@ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==1.15.0" }, + "smmap": { + "hashes": [ + "sha256:54c44c197c819d5ef1991799a7e30b662d1e520f2ac75c9efbeb54a742214cf4", + "sha256:9c98bbd1f9786d22f14b3d4126894d56befb835ec90cef151af566c7e19b5d24" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==3.0.4" + }, "snakefmt": { "hashes": [ "sha256:550b893d0b115adf73e3fc0acee5960f047b5e2c3ca5bbda31ba83f9d594c931", @@ -309,6 +474,13 @@ "index": "pypi", "version": "==0.1.4" }, + "snakemake": { + "hashes": [ + "sha256:d8bbde85fa8d93bd6312cae5d39247b316ead0589022aa7b48760374b1994b79" + ], + "index": "pypi", + "version": "==5.23.0" + }, "toml": { "hashes": [ "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f", @@ -316,6 +488,21 @@ ], "version": "==0.10.1" }, + "toposort": { + "hashes": [ + "sha256:d80128b83b411d503b0cdb4a8f172998bc1d3b434b6402a349b8ebd734d51a80", + "sha256:dba5ae845296e3bf37b042c640870ffebcdeb8cd4df45adaa01d8c5476c557dd" + ], + "version": "==1.5" + }, + "traitlets": { + "hashes": [ + "sha256:86c9351f94f95de9db8a04ad8e892da299a088a64fd283f9f6f18770ae5eae1b", + "sha256:9664ec0c526e48e7b47b7d14cd6b252efa03e0129011de0a9c1d70315d4309c3" + ], + "markers": "python_version >= '3.7'", + "version": "==5.0.4" + }, "typed-ast": { "hashes": [ "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355", @@ -342,14 +529,6 @@ ], "version": "==1.4.1" }, - "typing-extensions": { - "hashes": [ - "sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918", - "sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c", - "sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f" - ], - "version": "==3.7.4.3" - }, "urllib3": { "hashes": [ "sha256:91056c15fa70756691db97756772bb1eb9678fa585d9184f24534b100dc60f4a", @@ -381,11 +560,11 @@ }, "yq": { "hashes": [ - "sha256:a876304f2b360a968023eb7d13ec669e102fd381c818783e88e475bd2638d278", - "sha256:f6252a0757d0c2a9e55b4402e176a7e41a99e0e6dd5be4f9d5a4d651eeb4d6c0" + "sha256:8654d8217d98caa4b03bc00a7041b3716e7e6f441516b52a3f7cc91578c1e9be", + "sha256:ffdfdd94629aa6b56f54edeb345795e97f337c83715be0abe8113722f1c1cc57" ], "index": "pypi", - "version": "==2.10.1" + "version": "==2.11.0" } }, "develop": {} diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 9c4447e2..8112ceb7 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -1123,8 +1123,13 @@ shfmt [supports EditorConfig files for configuration](https://github.com/mvdan/s ## Snakemake +- [snakemake --lint](https://snakemake.readthedocs.io/en/stable/snakefiles/writing_snakefiles.html#best-practices) - [snakefmt](https://github.com/snakemake/snakefmt/) +### snakemake's configuration + +- Check the repository's README + ### snakefmt configuration - Check the repository's README diff --git a/lib/linter.sh b/lib/linter.sh index 03c094b7..1c56e9cc 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -120,7 +120,7 @@ RUBY_FILE_NAME="${RUBY_CONFIG_FILE:-.ruby-lint.yml}" # Name of the fi RUBY_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${RUBY_FILE_NAME}" # Path to the ruby lint rules # Snakemake Vars SNAKEMAKE_FILE_NAME="${SNAKEMAKE_CONFIG_FILE:-.snakefmt.toml}" -SNAKEMAKE_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${SNAKEMAKE_FILE_NAME}" +SNAKEMAKE_SNAKEFMT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${SNAKEMAKE_FILE_NAME}" # SQL Vars SQL_FILE_NAME=".sql-config.json" # Name of the file SQL_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${SQL_FILE_NAME}" # Path to the SQL lint rules @@ -210,7 +210,8 @@ VALIDATE_RAKU="${VALIDATE_RAKU}" # Boolean t VALIDATE_RUBY="${VALIDATE_RUBY}" # Boolean to validate language VALIDATE_STATES="${VALIDATE_STATES}" # Boolean to validate language VALIDATE_SHELL_SHFMT="${VALIDATE_SHELL_SHFMT}" # Boolean to check Shell files against editorconfig -VALIDATE_SNAKEMAKE="${VALIDATE_SNAKEMAKE}" # Boolean to check Snakefiles +VALIDATE_SNAKEMAKE_LINT="${VALIDATE_SNAKEMAKE_LINT}" # Boolean to validate Snakefiles +VALIDATE_SNAKEMAKE_SNAKEFMT="${VALIDATE_SNAKEMAKE_SNAKEFMT}" # Boolean to validate Snakefiles VALIDATE_SQL="${VALIDATE_SQL}" # Boolean to validate language VALIDATE_TERRAFORM="${VALIDATE_TERRAFORM}" # Boolean to validate language VALIDATE_TERRAFORM_TERRASCAN="${VALIDATE_TERRAFORM_TERRASCAN}" # Boolean to validate language @@ -1850,15 +1851,26 @@ if [ "${VALIDATE_SHELL_SHFMT}" == "true" ]; then fi fi -##################### -# SNAKEMAKE LINTING # -##################### -if [ "${VALIDATE_SNAKEMAKE}" == "true" ]; then +################## +# SNAKEMAKE LINT # +################## +if [ "${VALIDATE_SNAKEMAKE_LINT}" == "true" ]; then ################################ # Lint the files with snakefmt # ################################ # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "SNAKEMAKE" "snakefmt" "snakefmt --config ${SNAKEMAKE_LINTER_RULES} --diff" "\(Snakefile|.*\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" + LintCodebase "SNAKEMAKE_LINT" "snakemake --lint" "snakemake --lint -s" ".*\.\(smk\)\$" "\(Snakefile|.*\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" +fi + +###################### +# SNAKEMAKE SNAKEFMT # +###################### +if [ "${VALIDATE_SNAKEMAKE_SNAKEFMT}" == "true" ]; then + ################################ + # Lint the files with snakefmt # + ################################ + # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" + LintCodebase "SNAKEMAKE_SNAKEFMT" "snakefmt" "snakefmt --config ${SNAKEMAKE_SNAKEFMT_LINTER_RULES} --diff" "\(Snakefile|.*\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" fi ###################### diff --git a/lib/worker.sh b/lib/worker.sh index fcaf6acd..4b760aed 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -702,7 +702,8 @@ function RunTestCases() { TestCodebase "RAKU" "raku" "raku -c" ".*\.\(raku\|rakumod\|rakutest\|pm6\|pl6\|p6\)\$" "raku" TestCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES}" ".*\.\(rb\)\$" "ruby" TestCodebase "SHELL_SHFMT" "shfmt" "shfmt -d" ".*\.\(sh\|bash\|dash\|ksh\)\$" "shell_shfmt" - TestCodebase "SNAKEMAKE" "snakefmt" "snakefmt --config ${SNAKEMAKE_LINTER_RULES} --diff" ".*\.\(smk\)\$" "snakemake" + TestCodebase "SNAKEMAKE_LINT" "snakemake --lint" "snakemake --lint -s" ".*\.\(smk\)\$" "snakemake" + TestCodebase "SNAKEMAKE_SNAKEFMT" "snakefmt" "snakefmt --config ${SNAKEMAKE_SNAKEFMT_LINTER_RULES} --diff" ".*\.\(smk\)\$" "snakemake" TestCodebase "STATES" "asl-validator" "asl-validator --json-path" ".*\.\(json\)\$" "states" TestCodebase "SQL" "sql-lint" "sql-lint --config ${SQL_LINTER_RULES}" ".*\.\(sql\)\$" "sql" TestCodebase "TERRAFORM" "tflint" "tflint -c ${TERRAFORM_LINTER_RULES}" ".*\.\(tf\)\$" "terraform" From 3762abecb77937bc94d4bd95e9e67814a11eabce Mon Sep 17 00:00:00 2001 From: kpj Date: Tue, 8 Sep 2020 10:02:44 +0200 Subject: [PATCH 18/32] [Snakemake] Install extra psutil dependency (linux-headers) --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index e3102c3a..fabf61ce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -90,6 +90,7 @@ RUN apk add --update --no-cache \ krb5-libs \ libc-dev libxml2-dev libxml2-utils libgcc \ libcurl libintl libssl1.1 libstdc++ \ + linux-headers \ make \ musl-dev \ npm nodejs-current \ From 581f07a32b49afcadbcd66693c6cde8b0ba102a4 Mon Sep 17 00:00:00 2001 From: kpj Date: Tue, 8 Sep 2020 10:19:56 +0200 Subject: [PATCH 19/32] [Snakemake] Fix 'LINTER_NAME' --- lib/linter.sh | 2 +- lib/worker.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index 1c56e9cc..7f6710db 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1859,7 +1859,7 @@ if [ "${VALIDATE_SNAKEMAKE_LINT}" == "true" ]; then # Lint the files with snakefmt # ################################ # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "SNAKEMAKE_LINT" "snakemake --lint" "snakemake --lint -s" ".*\.\(smk\)\$" "\(Snakefile|.*\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" + LintCodebase "SNAKEMAKE_LINT" "snakemake" "snakemake --lint -s" ".*\.\(smk\)\$" "\(Snakefile|.*\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" fi ###################### diff --git a/lib/worker.sh b/lib/worker.sh index 4b760aed..7bfd8751 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -702,7 +702,7 @@ function RunTestCases() { TestCodebase "RAKU" "raku" "raku -c" ".*\.\(raku\|rakumod\|rakutest\|pm6\|pl6\|p6\)\$" "raku" TestCodebase "RUBY" "rubocop" "rubocop -c ${RUBY_LINTER_RULES}" ".*\.\(rb\)\$" "ruby" TestCodebase "SHELL_SHFMT" "shfmt" "shfmt -d" ".*\.\(sh\|bash\|dash\|ksh\)\$" "shell_shfmt" - TestCodebase "SNAKEMAKE_LINT" "snakemake --lint" "snakemake --lint -s" ".*\.\(smk\)\$" "snakemake" + TestCodebase "SNAKEMAKE_LINT" "snakemake" "snakemake --lint -s" ".*\.\(smk\)\$" "snakemake" TestCodebase "SNAKEMAKE_SNAKEFMT" "snakefmt" "snakefmt --config ${SNAKEMAKE_SNAKEFMT_LINTER_RULES} --diff" ".*\.\(smk\)\$" "snakemake" TestCodebase "STATES" "asl-validator" "asl-validator --json-path" ".*\.\(json\)\$" "states" TestCodebase "SQL" "sql-lint" "sql-lint --config ${SQL_LINTER_RULES}" ".*\.\(sql\)\$" "sql" From 6f6e6e9d039405a781402731c71990db30a54307 Mon Sep 17 00:00:00 2001 From: kpj Date: Tue, 8 Sep 2020 11:26:48 +0200 Subject: [PATCH 20/32] [Snakemake] Remove wrong function argument --- lib/linter.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linter.sh b/lib/linter.sh index 7f6710db..08180850 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1859,7 +1859,7 @@ if [ "${VALIDATE_SNAKEMAKE_LINT}" == "true" ]; then # Lint the files with snakefmt # ################################ # LintCodebase "FILE_TYPE" "LINTER_NAME" "LINTER_CMD" "FILE_TYPES_REGEX" "FILE_ARRAY" - LintCodebase "SNAKEMAKE_LINT" "snakemake" "snakemake --lint -s" ".*\.\(smk\)\$" "\(Snakefile|.*\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" + LintCodebase "SNAKEMAKE_LINT" "snakemake" "snakemake --lint -s" "\(Snakefile|.*\.smk\)\$" "${FILE_ARRAY_SNAKEMAKE[@]}" fi ###################### From a6c9656015e83b73a765c60f6170d28844d38f6a Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Tue, 8 Sep 2020 09:47:57 -0500 Subject: [PATCH 21/32] fixing vars --- Dockerfile | 1 + README.md | 3 ++- lib/linter.sh | 4 ++-- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index fabf61ce..e4613b94 100644 --- a/Dockerfile +++ b/Dockerfile @@ -338,6 +338,7 @@ ENV ACTIONS_RUNNER_DEBUG=${ACTIONS_RUNNER_DEBUG} \ OUTPUT_FOLDER=${OUTPUT_FOLDER} \ OUTPUT_FORMAT=${OUTPUT_FORMAT} \ RUN_LOCAL=${RUN_LOCAL} \ + SNAKEMAKE_CONFIG_FILE=${SNAKEMAKE_CONFIG_FILE} \ TEST_CASE_RUN=${TEST_CASE_RUN} \ VALIDATE_ALL_CODEBASE=${VALIDATE_ALL_CODEBASE} \ VALIDATE_ANSIBLE=${VALIDATE_ANSIBLE} \ diff --git a/README.md b/README.md index 29f73666..b73f6dae 100644 --- a/README.md +++ b/README.md @@ -194,6 +194,7 @@ But if you wish to select or exclude specific linters, we give you full control | **PYTHON_FLAKE8_CONFIG_FILE** | `.flake8` | Filename for [flake8 configuration](https://flake8.pycqa.org/en/latest/user/configuration.html) (ex: `.flake8`, `tox.ini`) | | **PYTHON_BLACK_CONFIG_FILE** | `.python-black` | Filename for [black configuration](https://github.com/psf/black/blob/master/docs/compatible_configs.md) (ex: `.isort.cfg`, `pyproject.toml`) | | **RUBY_CONFIG_FILE** | `.ruby-lint.yml` | Filename for [rubocop configuration](https://docs.rubocop.org/rubocop/configuration.html) (ex: `.ruby-lint.yml`, `.rubocop.yml`) | +| **SNAKEMAKE_CONFIG_FILE** | `.snakefmt.toml` | Filename for [Snakemake configuration](https://github.com/snakemake/snakefmt#configuration) (ex: `pyproject.toml`, `.snakefmt.toml`) | | **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. | @@ -244,7 +245,7 @@ But if you wish to select or exclude specific linters, we give you full control | **VALIDATE_STATES** | `true` | Flag to enable or disable the linting process for AWS States Language. | | **VALIDATE_SQL** | `true` | Flag to enable or disable the linting process of the SQL language. | | **VALIDATE_TERRAFORM** | `true` | Flag to enable or disable the linting process of the Terraform language. | -| **VALIDATE_TERRAFORM_TERRASCAN** | `true` | Flag to enable or disable the linting process of the Terraform language for security related issues. | +| **VALIDATE_TERRAFORM_TERRASCAN** | `true` | 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) | diff --git a/lib/linter.sh b/lib/linter.sh index 08180850..5cb04b8e 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -119,8 +119,8 @@ R_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${R_FILE_NAME}" 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 # Snakemake Vars -SNAKEMAKE_FILE_NAME="${SNAKEMAKE_CONFIG_FILE:-.snakefmt.toml}" -SNAKEMAKE_SNAKEFMT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${SNAKEMAKE_FILE_NAME}" +SNAKEMAKE_FILE_NAME="${SNAKEMAKE_CONFIG_FILE:-.snakefmt.toml}" # Name of the file +SNAKEMAKE_SNAKEFMT_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${SNAKEMAKE_FILE_NAME}" # Path to the snakemake lint rules # SQL Vars SQL_FILE_NAME=".sql-config.json" # Name of the file SQL_LINTER_RULES="${DEFAULT_RULES_LOCATION}/${SQL_FILE_NAME}" # Path to the SQL lint rules From 20c0ebf419d83601d40e700196983eaf6958ed4f Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Tue, 8 Sep 2020 10:04:29 -0500 Subject: [PATCH 22/32] fix lock --- dependencies/Pipfile.lock | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dependencies/Pipfile.lock b/dependencies/Pipfile.lock index d53e2656..e1771dcf 100644 --- a/dependencies/Pipfile.lock +++ b/dependencies/Pipfile.lock @@ -163,7 +163,7 @@ "sha256:9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827", "sha256:a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", "version": "==0.15.2" }, "flake8": { @@ -218,7 +218,7 @@ "sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9", "sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f" ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", "version": "==0.10.0" }, "jsonpatch": { @@ -368,7 +368,7 @@ "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" ], - "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", "version": "==2.4.7" }, "pyrsistent": { @@ -382,7 +382,7 @@ "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==2.8.1" }, "pyyaml": { @@ -455,7 +455,7 @@ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], - "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==1.15.0" }, "smmap": { From a0d4012b67cac9bc9c921024330db933e1b8cec5 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Tue, 8 Sep 2020 12:01:17 -0500 Subject: [PATCH 23/32] like this? --- lib/worker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worker.sh b/lib/worker.sh index dd66abe7..d32bdc0b 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -166,7 +166,7 @@ function LintCodebase() { elif [[ ${FILE} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue - elif [[ ${FILE} == *".git/"* ]]; then + elif [[ ${FILE} == *".git"* ]] && [[ ${FILE} != *".github"* ]]; then # This is likely the .git folder and shouldn't be parsed continue elif [[ ${FILE} == *".venv"* ]]; then From 0e5f996c3c68727d21824ff25bf80ebcbeb04477 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Tue, 8 Sep 2020 12:16:59 -0500 Subject: [PATCH 24/32] look at folders and not file names --- lib/worker.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/worker.sh b/lib/worker.sh index d32bdc0b..75f1af6a 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -160,19 +160,19 @@ function LintCodebase() { ###################################################### # Make sure we don't lint node modules or test cases # ###################################################### - if [[ ${FILE} == *"node_modules"* ]]; then + if [[ ${DIR_NAME} == *"node_modules"* ]]; then # This is a node modules file continue - elif [[ ${FILE} == *"${TEST_CASE_FOLDER}"* ]]; then + elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue - elif [[ ${FILE} == *".git"* ]] && [[ ${FILE} != *".github"* ]]; then + elif [[ ${DIR_NAME} == *".git"* ]] && [[ ${DIR_NAME} != *".github"* ]]; then # This is likely the .git folder and shouldn't be parsed continue - elif [[ ${FILE} == *".venv"* ]]; then + elif [[ ${DIR_NAME} == *".venv"* ]]; then # This is likely the python virtual environment folder and shouldn't be parsed continue - elif [[ ${FILE} == *".rbenv"* ]]; then + elif [[ ${DIR_NAME} == *".rbenv"* ]]; then # This is likely the ruby environment folder and shouldn't be parsed continue elif [[ ${FILE_TYPE} == "BASH" ]] && ! IsValidShellScript "${FILE}"; then From 83666ffaba6fa9aba051e8142bb3ec9ef1256ba5 Mon Sep 17 00:00:00 2001 From: Marco Ferrari Date: Tue, 8 Sep 2020 19:20:49 +0200 Subject: [PATCH 25/32] Fix getting filename for hidden files --- lib/linter.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index 5cb04b8e..84206afe 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -495,18 +495,21 @@ GetLinterRules() { # Pull in vars # ################ LANGUAGE_NAME="${1}" # Name of the language were looking for + debug "Getting linter rules for ${LANGUAGE_NAME}..." ####################################################### # Need to create the variables for the real variables # ####################################################### LANGUAGE_FILE_NAME="${LANGUAGE_NAME}_FILE_NAME" LANGUAGE_LINTER_RULES="${LANGUAGE_NAME}_LINTER_RULES" + debug "Variable names for language file name: ${LANGUAGE_FILE_NAME}, language linter rules: ${LANGUAGE_LINTER_RULES}" ########################## # Get the file extension # ########################## FILE_EXTENSION=$(echo "${!LANGUAGE_FILE_NAME}" | rev | cut -d'.' -f1 | rev) - FILE_NAME=$(echo "${!LANGUAGE_FILE_NAME}" | rev | cut -d'.' -f2 | rev) + FILE_NAME=$(basename "${!LANGUAGE_FILE_NAME}" ".${FILE_EXTENSION}") + debug "${LANGUAGE_NAME} language rule file (${!LANGUAGE_FILE_NAME}) has ${FILE_NAME} name and ${FILE_EXTENSION} extension" ############################### # Set the secondary file name # @@ -536,8 +539,10 @@ GetLinterRules() { ######################################## eval "${LANGUAGE_LINTER_RULES}=${GITHUB_WORKSPACE}/${LINTER_RULES_PATH}/${!LANGUAGE_FILE_NAME}" else + debug " -> Codebase does NOT have file:[${GITHUB_WORKSPACE}/${LINTER_RULES_PATH}/${!LANGUAGE_FILE_NAME}]" # Check if we have secondary name to check if [ -n "$SECONDARY_FILE_NAME" ]; then + debug "${LANGUAGE_NAME} language rule file has a secondary rules file name to check: ${SECONDARY_FILE_NAME}" # We have a secondary name to validate if [ -f "${GITHUB_WORKSPACE}/${LINTER_RULES_PATH}/${SECONDARY_FILE_NAME}" ]; then info "----------------------------------------------" @@ -549,10 +554,11 @@ GetLinterRules() { eval "${LANGUAGE_LINTER_RULES}=${GITHUB_WORKSPACE}/${LINTER_RULES_PATH}/${SECONDARY_FILE_NAME}" fi fi - ######################################################## - # No user default provided, using the template default # - ######################################################## - debug " -> Codebase does NOT have file:[${LINTER_RULES_PATH}/${!LANGUAGE_FILE_NAME}], using Default rules at:[${!LANGUAGE_LINTER_RULES}]" + + ######################################################## + # No user default provided, using the template default # + ######################################################## + debug " -> Codebase does NOT have file:[${GITHUB_WORKSPACE}/${LINTER_RULES_PATH}/${!LANGUAGE_FILE_NAME}], nor file:[${GITHUB_WORKSPACE}/${LINTER_RULES_PATH}/${SECONDARY_FILE_NAME}], using Default rules at:[${!LANGUAGE_LINTER_RULES}]" fi } ################################################################################ From fd42f4b3fbc49ba65d9d29d4db84c2cbb11e24ea Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Tue, 8 Sep 2020 15:45:17 -0500 Subject: [PATCH 26/32] science... --- lib/worker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worker.sh b/lib/worker.sh index 75f1af6a..ea731182 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -166,7 +166,7 @@ function LintCodebase() { elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue - elif [[ ${DIR_NAME} == *".git"* ]] && [[ ${DIR_NAME} != *".github"* ]]; then + elif [[ ${DIR_NAME} == *".git"* ]] || [[ ${DIR_NAME} == *".git/"* ]]; then # This is likely the .git folder and shouldn't be parsed continue elif [[ ${DIR_NAME} == *".venv"* ]]; then From e9811c85d6cb375158a20eaaf44e638348573478 Mon Sep 17 00:00:00 2001 From: Lukas Gravley Date: Tue, 8 Sep 2020 16:00:12 -0500 Subject: [PATCH 27/32] Update lib/worker.sh yes Co-authored-by: Goryudyuma(Kei.Matsumoto) <6211370+Goryudyuma@users.noreply.github.com> --- lib/worker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worker.sh b/lib/worker.sh index ea731182..59e9c572 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -166,7 +166,7 @@ function LintCodebase() { elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue - elif [[ ${DIR_NAME} == *".git"* ]] || [[ ${DIR_NAME} == *".git/"* ]]; then + elif [[ ${DIR_NAME} == *".git" ]] || [[ ${DIR_NAME} == *".git/"* ]]; then # This is likely the .git folder and shouldn't be parsed continue elif [[ ${DIR_NAME} == *".venv"* ]]; then From 17c3ded69535845693bac9c25039659b02de7d4f Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 9 Sep 2020 09:24:27 -0500 Subject: [PATCH 28/32] i forgot how this works --- lib/worker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worker.sh b/lib/worker.sh index ea731182..1d1b4d9b 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -166,7 +166,7 @@ function LintCodebase() { elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue - elif [[ ${DIR_NAME} == *".git"* ]] || [[ ${DIR_NAME} == *".git/"* ]]; then + elif [[ ${DIR_NAME} == *".git" ]]; then # This is likely the .git folder and shouldn't be parsed continue elif [[ ${DIR_NAME} == *".venv"* ]]; then From eb67d9b9c6d44a62eac9f4f769e626c8b911fec5 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 9 Sep 2020 09:28:39 -0500 Subject: [PATCH 29/32] fix that dumb action --- lib/worker.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/worker.sh b/lib/worker.sh index 0a87a809..1d1b4d9b 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -166,11 +166,7 @@ function LintCodebase() { elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue -<<<<<<< HEAD elif [[ ${DIR_NAME} == *".git" ]]; then -======= - elif [[ ${DIR_NAME} == *".git" ]] || [[ ${DIR_NAME} == *".git/"* ]]; then ->>>>>>> e9811c85d6cb375158a20eaaf44e638348573478 # This is likely the .git folder and shouldn't be parsed continue elif [[ ${DIR_NAME} == *".venv"* ]]; then From dbd4cd673db50b244266593881ebfd0540f2c179 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 9 Sep 2020 10:04:21 -0500 Subject: [PATCH 30/32] this has to be right --- lib/worker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worker.sh b/lib/worker.sh index 1d1b4d9b..203eaffe 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -166,7 +166,7 @@ function LintCodebase() { elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue - elif [[ ${DIR_NAME} == *".git" ]]; then + elif [[ ${DIR_NAME} == *".git" ]] || [[ ${FILE_NAME} == *".git/"* ]]; then # This is likely the .git folder and shouldn't be parsed continue elif [[ ${DIR_NAME} == *".venv"* ]]; then From 880380d118932ff2352fda3b7df24758e2a35b70 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 9 Sep 2020 10:18:12 -0500 Subject: [PATCH 31/32] if i could only read --- lib/worker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worker.sh b/lib/worker.sh index 203eaffe..11390894 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -166,7 +166,7 @@ function LintCodebase() { elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue - elif [[ ${DIR_NAME} == *".git" ]] || [[ ${FILE_NAME} == *".git/"* ]]; then + elif [[ ${DIR_NAME} == *".git" ]] || [[ ${FILE} == *".git/"* ]]; then # This is likely the .git folder and shouldn't be parsed continue elif [[ ${DIR_NAME} == *".venv"* ]]; then From b5d42bf181889d1f80b472fec142212c42bac99b Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 9 Sep 2020 10:37:02 -0500 Subject: [PATCH 32/32] this makes no sense --- lib/worker.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/worker.sh b/lib/worker.sh index 11390894..44375fcd 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -166,7 +166,7 @@ function LintCodebase() { elif [[ ${DIR_NAME} == *"${TEST_CASE_FOLDER}"* ]]; then # This is the test cases, we should always skip continue - elif [[ ${DIR_NAME} == *".git" ]] || [[ ${FILE} == *".git/"* ]]; then + elif [[ ${DIR_NAME} == *".git" ]] || [[ ${FILE} == *".git" ]] || [[ ${FILE} == *".git/"* ]]; then # This is likely the .git folder and shouldn't be parsed continue elif [[ ${DIR_NAME} == *".venv"* ]]; then