From 386ad69aae07814df731586cd9e8cd8bcf7fd26a Mon Sep 17 00:00:00 2001 From: mil7 <49973666+mil7@users.noreply.github.com> Date: Thu, 23 Jul 2020 14:55:56 +0200 Subject: [PATCH 1/7] fix disabling-linters dokumentation Fix link to #closure Everything after #clojure chapter was not properly defined (anymore) --- docs/disabling-linters.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 858966a0..68184302 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -39,6 +39,7 @@ For some linters it is also possible to override rules on a case by case level w - [Kotlin](#kotlin) - [OpenAPI](#openapi) - [Protocol Buffers](#protocol-buffers) +- [Clojure](#clojure) - [EDITORCONFIG-CHECKER](#editorconfig-checker) - [HTML](#html) @@ -946,8 +947,9 @@ lint: ### clj-kondo disable entire file -````clojure +```clojure {:output {:exclude-files ["path/to/file"]}} +``` ## EDITORCONFIG-CHECKER - [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) @@ -1003,4 +1005,3 @@ lint: ### htmlhint disable entire file - There is currently **No** way to disable rules in an entire file -```` From 5c0da604bf9f49167a10a9d61ecb1405466b6118 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Jul 2020 09:16:40 -0500 Subject: [PATCH 2/7] Adding LFS --- Dockerfile | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index b4134227..ce9cf959 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,23 +54,19 @@ RUN apk add --update --no-cache \ bash \ curl \ gcc \ - git \ + git git-lfs\ go \ icu-libs \ jq \ libxml2-utils \ make \ musl-dev \ - npm \ - nodejs \ + npm nodejs \ openjdk8-jre \ perl \ php7 \ py3-setuptools \ - ruby \ - ruby-dev \ - ruby-bundler \ - ruby-rdoc + ruby ruby-dev ruby-bundler ruby-rdoc ######################################## # Copy dependencies files to container # From dd20279eae2528af80ebeca0567e21de45544ecb Mon Sep 17 00:00:00 2001 From: mil7 <49973666+mil7@users.noreply.github.com> Date: Thu, 23 Jul 2020 16:25:23 +0200 Subject: [PATCH 3/7] Fix horizontal line --- docs/disabling-linters.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 68184302..31864c8b 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -954,7 +954,7 @@ lint: ## EDITORCONFIG-CHECKER - [editorconfig-checker](https://github.com/editorconfig-checker/editorconfig-checker) --------------------------------------------------------------------------------- +--- ### editorconfig-checker Config file - `.github/linters/.ecrc` From 7d07c7e2b2dd3ccbe44be6a5de03ea9a195d46f9 Mon Sep 17 00:00:00 2001 From: mil7 <49973666+mil7@users.noreply.github.com> Date: Thu, 23 Jul 2020 16:26:48 +0200 Subject: [PATCH 4/7] Delete surplus horizonal line --- docs/disabling-linters.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 31864c8b..491f76bc 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -954,8 +954,6 @@ lint: ## 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 From c41b2aef29536655567cd34501fe46f37f2a60d9 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Jul 2020 10:15:18 -0500 Subject: [PATCH 5/7] fix shyaml --- dependencies/Pipfile.lock | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/dependencies/Pipfile.lock b/dependencies/Pipfile.lock index 9ddf4df3..4e90e85d 100644 --- a/dependencies/Pipfile.lock +++ b/dependencies/Pipfile.lock @@ -28,6 +28,7 @@ "sha256:2f4078c2a41bf377eea06d71c9d2ba4eb8f6b1af2135bec27bbbb7d8f12bb703", "sha256:bc58d83eb610252fd8de6363e39d4f1d0619c894b0ed24603b881c02e64c7386" ], + "markers": "python_version >= '3.5'", "version": "==2.4.2" }, "attrs": { @@ -35,6 +36,7 @@ "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c", "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==19.3.0" }, "aws-sam-translator": { @@ -47,16 +49,17 @@ }, "boto3": { "hashes": [ - "sha256:07bd0872e9178b637baefb82aff8abb76197770c9fc60c4d6575564ba878e3e4" + "sha256:4735fdf490094537ea0cb93ba4237db442195c37f974ea4ad44b9a5af98e6d7b", + "sha256:838cea329851e11b9a9dae1c00cd5ef2f3b29ac83c061733b2e93b64c333750f" ], - "version": "==1.14.22" + "version": "==1.14.26" }, "botocore": { "hashes": [ - "sha256:4d084dfcfcdf21ac2df17d017607ca53d53ac6c2fa17484cdd87ef78daba06b8", - "sha256:f491d3c29d7dda8c8907c520bc96d77a67a8953dfed7f55c250799849e213640" + "sha256:0c4ed6349e8ef6bfe9648757f3ff66c33a8f37d9cbadd9c17987138184990cbd", + "sha256:28832be365204f00d5c7d2c2a0538d9d082dbfc39ed984fdc9556770470b7487" ], - "version": "==1.17.22" + "version": "==1.17.26" }, "cfn-lint": { "hashes": [ @@ -79,6 +82,7 @@ "sha256:9e4d7ecfc600058e07ba661411a2b7de2fd0fafa17d1a7f7361cd47b1175c827", "sha256:a2aeea129088da402665e92e0b25b04b073c04b2dce4ab65caaa38b7ce2e1a99" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", "version": "==0.15.2" }, "isort": { @@ -86,6 +90,7 @@ "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1", "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", "version": "==4.3.21" }, "jmespath": { @@ -93,6 +98,7 @@ "sha256:b85d0567b8666149a93172712e68920734333c0ce7e89b78b3e987f71e5ed4f9", "sha256:cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f" ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2'", "version": "==0.10.0" }, "jsonpatch": { @@ -108,6 +114,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": { @@ -147,6 +154,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": { @@ -190,6 +198,7 @@ "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c", "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==2.8.1" }, "pyyaml": { @@ -229,6 +238,7 @@ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259", "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced" ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2'", "version": "==1.15.0" }, "toml": { @@ -240,11 +250,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": [ From 1102675a6d9da39739985968e51d9a9b2b810dc9 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Jul 2020 10:18:54 -0500 Subject: [PATCH 6/7] adding the rest --- lib/linter.sh | 29 +++++------------------------ 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/lib/linter.sh b/lib/linter.sh index 46902f57..7c5fabc1 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -575,34 +575,15 @@ 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 - # Found it - return 0 - fi - - ############################### - # 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 + ##################################### + # See if it contains AWS References # + ##################################### + if grep -q -E '(AWS|Alexa|Custom)::' "${FILE}" > /dev/null; then # Found it return 0 fi From b6096044cfa3cf72fe7f9ab72cade44979d63e49 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Jul 2020 10:19:58 -0500 Subject: [PATCH 7/7] now with changes --- dependencies/Pipfile | 1 - dependencies/Pipfile.lock | 10 +--------- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/dependencies/Pipfile b/dependencies/Pipfile index 2fce4271..b9df418b 100644 --- a/dependencies/Pipfile +++ b/dependencies/Pipfile @@ -10,7 +10,6 @@ yamllint = "*" pylint = "*" yq = "*" cfn-lint = "*" -shyaml = "*" [requires] python_version = "3.8" diff --git a/dependencies/Pipfile.lock b/dependencies/Pipfile.lock index 4e90e85d..356eeda1 100644 --- a/dependencies/Pipfile.lock +++ b/dependencies/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "f8d7f08c1efbacea7c92868babd54bc040413f865e3cd7ea8d4bebab310b3da3" + "sha256": "1ccc4fd5c20ba56f1cca85abdd09b24798c3ad68b921cb42c501177598d986c9" }, "pipfile-spec": 6, "requires": { @@ -225,14 +225,6 @@ ], "version": "==0.3.3" }, - "shyaml": { - "hashes": [ - "sha256:3a57e380f66043c661d417106a0f101f8068c80caa2afef57c90447b88526c3d", - "sha256:ac9066eed5b8445de1f83a99106ca96a77900b6873de327fd50d3e3102084752" - ], - "index": "pypi", - "version": "==0.6.1" - }, "six": { "hashes": [ "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259",