From 622b42a0638617d089eb2a502df58e6b3a9e4696 Mon Sep 17 00:00:00 2001 From: Solmaz Abbaspour <5240896+solmazabbaspour@users.noreply.github.com> Date: Wed, 22 Apr 2020 15:12:56 +0200 Subject: [PATCH 01/21] Create disabling-linters.md --- docs/disabling-linters.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 docs/disabling-linters.md diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md new file mode 100644 index 00000000..48cdce85 --- /dev/null +++ b/docs/disabling-linters.md @@ -0,0 +1 @@ +placeholder From 1faf32f139867165d4e60b11748a69cb587ac45a Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 22 Apr 2020 10:22:51 -0500 Subject: [PATCH 02/21] adding base struct --- docs/disabling-linters.md | 166 +++++++++++++++++++++++++++++++++++++- 1 file changed, 165 insertions(+), 1 deletion(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 48cdce85..5d29da36 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -1 +1,165 @@ -placeholder +# Disabling linters and rules +If you find you need to ignore certain errors and warnings, you will need to know the format to disable the linter rules. +Below is examples and documentation for each language and the various methods to disable. + +-------------------------------------------------------------------------------- + +## Ruby +### Rubocop Config file +### Rubocop disable single line +### Rubocop disable code block +### Rubocop disable entire file + +-------------------------------------------------------------------------------- + +## Shell +### Shellcheck Config file +### Shellcheck disable single line +### Shellcheck disable code block +### Shellcheck disable entire file + +-------------------------------------------------------------------------------- + +## Ansible +### Ansible-lint Config file +### Ansible-lint disable single line +### Ansible-lint disable code block +### Ansible-lint disable entire file + +-------------------------------------------------------------------------------- + +## YAML +### Yamllint Config file +### Yamllint disable single line +### Yamllint disable code block +### Yamllint disable entire file + +-------------------------------------------------------------------------------- + +## Python3 +### Pylint Config file +### Pylint disable single line +### Pylint disable code block +### Pylint disable entire file + +-------------------------------------------------------------------------------- + +## JSON +### JsonLint Config file +### JsonLint disable single line +### JsonLint disable code block +### JsonLint disable entire file + +-------------------------------------------------------------------------------- + +## Markdown +- [Markdownlint-cli](https://github.com/igorshubovych/markdownlint-cli#readme) +- [Markdownlint rules](https://awesomeopensource.com/project/DavidAnson/markdownlint) + +### Markdownlint Config file +- `.markdown-lint.yml` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.markdownlint.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 Config file +### Perl disable single line +### Perl disable code block +### Perl disable entire file + +-------------------------------------------------------------------------------- + +## XML +### LibXML Config file +### LibXML disable single line +### LibXML disable code block +### LibXML disable entire file + +-------------------------------------------------------------------------------- + +## Coffeescript +### coffeelint Config file +### coffeelint disable single line +### coffeelint disable code block +### coffeelint disable entire file + +-------------------------------------------------------------------------------- + +## Javascript (eslint) +### Javascript eslint Config file +### Javascript eslint disable single line +### Javascript eslint disable code block +### Javascript eslint disable entire file + +-------------------------------------------------------------------------------- + +## Javascript (standard) +### Javascript standard Config file +### Javascript standard disable single line +### Javascript standard disable code block +### Javascript standard disable entire file + +-------------------------------------------------------------------------------- + +## Typescript (eslint) + +### Typescript eslint disable single line +### Typescript eslint disable code block +### Typescript eslint disable entire file + +-------------------------------------------------------------------------------- + +## Typescript (standard) +### Typescript standard Config file +### Typescript standard disable single line +### Typescript standard disable code block +### Typescript standard disable entire file + +-------------------------------------------------------------------------------- + +## Golang +### golangci-lint standard Config file +### golangci-lint disable single line +### golangci-lint disable code block +### golangci-lint disable entire file + +-------------------------------------------------------------------------------- +## Dockerfile +### Dockerfilelint standard Config file +### Dockerfilelint disable single line +### Dockerfilelint disable code block +### Dockerfilelint disable entire file + +-------------------------------------------------------------------------------- + +## Terraform +### tflint standard Config file +### tflint disable single line +### tflint disable code block +### tflint disable entire file + +-------------------------------------------------------------------------------- From 62c3307528d906faf9ba2167235fdd752e3162e8 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Wed, 22 Apr 2020 11:58:51 -0500 Subject: [PATCH 03/21] adding more --- docs/disabling-linters.md | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 5d29da36..285d5343 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -5,11 +5,28 @@ Below is examples and documentation for each language and the various methods to -------------------------------------------------------------------------------- ## Ruby -### Rubocop Config file -### Rubocop disable single line -### Rubocop disable code block -### Rubocop disable entire file +- [Rubocop](https://github.com/rubocop-hq/rubocop) +### Rubocop Config file +- `.ruby-lint.yml` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.ruby-lint.yml` + +### Rubocop disable single line +```ruby +method(argument) # rubocop:disable SomeRule, SomeOtherRule +``` + +### Rubocop disable code block +```ruby +# rubocop:disable +This is a long line +var="this is some other stuff" +# rubocop:enable +``` + +### Rubocop disable entire file +If you need to ignore an entire file, you can update the `.ruby-lint.yml` -------------------------------------------------------------------------------- ## Shell From 71c504df181c493411fffa99aeba6bd69964b89a Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 07:50:07 -0500 Subject: [PATCH 04/21] adding shell --- docs/disabling-linters.md | 50 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 285d5343..8d7f6513 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -11,6 +11,7 @@ Below is examples and documentation for each language and the various methods to - `.ruby-lint.yml` - You can pass multiple rules and overwrite default rules - File should be located at: `.github/linters/.ruby-lint.yml` +- **Note:** We use the Default **GitHub** Rule set from [Rubocop-GitHub](https://github.com/github/rubocop-github) ### Rubocop disable single line ```ruby @@ -26,14 +27,61 @@ var="this is some other stuff" ``` ### Rubocop disable entire file -If you need to ignore an entire file, you can update the `.ruby-lint.yml` +If you need to ignore an entire file, you can update the `.ruby-lint.yml` to ignore certain files and locations + +```yml +inherit_from: + - .rubocop_todo.yml + - .rubocop_app_overrides.yml + +inherit_mode: + merge: + - Exclude + +Rails: + Enabled: true + +AllCops: + TargetRubyVersion: 2.5.1 + EnabledByDefault: true + Exclude: + - 'db/**/*' + - 'config/**/*' + - 'script/**/*' + - 'bin/{rails,rake}' + - !ruby/regexp /old_and_unused\.rb$/ +``` + -------------------------------------------------------------------------------- ## Shell +**Shellcheck** is an opensource tool we use for linting and validation of shell scripting. +- [Shellcheck](https://github.com/koalaman/shellcheck) + ### Shellcheck Config file +- There is no top level *configuration file* available at this time + ### Shellcheck disable single line +```bash +echo "Terrible stuff" # shellcheck disable=SC2059,SC2086 +``` + ### Shellcheck disable code block +```bash +# shellcheck disable=SC2059,SC2086 +echo "some hot garbage" +echo "More garbage code" +``` + ### Shellcheck disable entire file +- **Note:** The disable must be on the second line of the code right after the shebang +```bash +#!/bin/sh +# shellcheck disable=SC2059,SC1084 + +echo "stuff" +moreThings() +``` -------------------------------------------------------------------------------- From fe18dba9cbf16fdc1dc42edf7a64cfa1c0d9fc91 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 07:55:25 -0500 Subject: [PATCH 05/21] adding yml --- docs/disabling-linters.md | 40 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 38 insertions(+), 2 deletions(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 8d7f6513..7e4b761d 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -8,7 +8,7 @@ Below is examples and documentation for each language and the various methods to - [Rubocop](https://github.com/rubocop-hq/rubocop) ### Rubocop Config file -- `.ruby-lint.yml` +- `.github/linters/.ruby-lint.yml` - You can pass multiple rules and overwrite default rules - File should be located at: `.github/linters/.ruby-lint.yml` - **Note:** We use the Default **GitHub** Rule set from [Rubocop-GitHub](https://github.com/github/rubocop-github) @@ -55,7 +55,7 @@ AllCops: -------------------------------------------------------------------------------- ## Shell -**Shellcheck** is an opensource tool we use for linting and validation of shell scripting. +**Shellcheck** is an opensource tool we use for linting and validation of the shell scripting language. - [Shellcheck](https://github.com/koalaman/shellcheck) ### Shellcheck Config file @@ -94,10 +94,46 @@ moreThings() -------------------------------------------------------------------------------- ## 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 +- Lorem : ipsum + dolor : sit amet, + consectetur : adipiscing elit +# yamllint enable +``` + ### Yamllint disable entire file +If you need to ignore an entire file, you can update the `.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/* +``` -------------------------------------------------------------------------------- From 68d4fdb1d67b1ea7ffee921f7edfcc7d4ded1016 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 09:01:15 -0500 Subject: [PATCH 06/21] addig docker --- docs/disabling-linters.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 7e4b761d..76d40304 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -27,7 +27,7 @@ var="this is some other stuff" ``` ### Rubocop disable entire file -If you need to ignore an entire file, you can update the `.ruby-lint.yml` to ignore certain files and locations +If you need to ignore an entire file, you can update the `.github/linters/.ruby-lint.yml` to ignore certain files and locations ```yml inherit_from: @@ -116,7 +116,7 @@ This line is waaaaaaaaaay too long # yamllint disable-line ``` ### Yamllint disable entire file -If you need to ignore an entire file, you can update the `.yaml-lint.yml` to ignore certain files and locations +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: | @@ -250,10 +250,21 @@ Here is more data -------------------------------------------------------------------------------- ## 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) -------------------------------------------------------------------------------- From 7ec996c60dc6f96744059df9f15bc730679127ce Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 09:03:56 -0500 Subject: [PATCH 07/21] adding xml --- docs/disabling-linters.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 76d40304..53007e51 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -195,10 +195,19 @@ Here is more data -------------------------------------------------------------------------------- ## 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) -------------------------------------------------------------------------------- From 9b68dc7f6e9f3a44799f3e2dc76ca4f2346db421 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 09:08:38 -0500 Subject: [PATCH 08/21] adding coffee --- docs/disabling-linters.md | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 53007e51..574643b8 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -158,7 +158,7 @@ rules: - [Markdownlint rules](https://awesomeopensource.com/project/DavidAnson/markdownlint) ### Markdownlint Config file -- `.markdown-lint.yml` +- `.github/linters/.markdown-lint.yml` - You can pass multiple rules and overwrite default rules - File should be located at: `.github/linters/.markdownlint.yml` @@ -212,10 +212,32 @@ Here is more data -------------------------------------------------------------------------------- ## Coffeescript +- [coffeelint](http://www.coffeelint.org/) + ### 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 -------------------------------------------------------------------------------- From e0d4e19cf2ee5c892888486c1a525cd0bea3d99a Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 09:11:42 -0500 Subject: [PATCH 09/21] adding golang --- docs/disabling-linters.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 574643b8..5243b5f3 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -274,10 +274,21 @@ taz = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/ -------------------------------------------------------------------------------- ## 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) -------------------------------------------------------------------------------- ## Dockerfile From 90faa90bf503f4766e56ad99028ae16d10cb4881 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 09:16:33 -0500 Subject: [PATCH 10/21] Adding tflint --- docs/disabling-linters.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 5243b5f3..a0f2abab 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -291,6 +291,7 @@ taz = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/ - There is currently **No** way to disable rules inline of the file(s) -------------------------------------------------------------------------------- + ## Dockerfile -[dockerfilelint](https://github.com/replicatedhq/dockerfilelint.git) @@ -311,9 +312,20 @@ taz = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/ -------------------------------------------------------------------------------- ## 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) -------------------------------------------------------------------------------- From e0bfa7f392169461ce7044db8f70e2b94003c8f0 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 09:19:21 -0500 Subject: [PATCH 11/21] adding json --- docs/disabling-linters.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index a0f2abab..64710bff 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -55,7 +55,6 @@ AllCops: -------------------------------------------------------------------------------- ## Shell -**Shellcheck** is an opensource tool we use for linting and validation of the shell scripting language. - [Shellcheck](https://github.com/koalaman/shellcheck) ### Shellcheck Config file @@ -146,10 +145,19 @@ rules: -------------------------------------------------------------------------------- ## 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) -------------------------------------------------------------------------------- From 08fc1d4640abd5cd206e2d121d696e5764ee6b36 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 09:39:20 -0500 Subject: [PATCH 12/21] adding python --- docs/disabling-linters.md | 76 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 72 insertions(+), 4 deletions(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 64710bff..fb56ed7a 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -85,11 +85,34 @@ moreThings() -------------------------------------------------------------------------------- ## Ansible -### Ansible-lint Config file -### Ansible-lint disable single line -### Ansible-lint disable code block -### Ansible-lint disable entire file +- [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 +``` -------------------------------------------------------------------------------- ## YAML @@ -137,10 +160,55 @@ rules: -------------------------------------------------------------------------------- ## 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.bla) # pylint: disable=no-member + # error + print(self.blop) +``` + ### Pylint disable entire file +```python +#!/bin/python3 +# pylint: skip-file + +var = "terrible code down here..." +``` -------------------------------------------------------------------------------- From eaed00d27a2fc8f50db085b4e335970469d51534 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 09:41:00 -0500 Subject: [PATCH 13/21] adding perl --- docs/disabling-linters.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index fb56ed7a..c7a69e71 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -263,10 +263,19 @@ Here is more data -------------------------------------------------------------------------------- ## 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) -------------------------------------------------------------------------------- From 5018278a3cd74b290eaa1deb592deeda1b2cb08a Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 09:57:18 -0500 Subject: [PATCH 14/21] adding toc --- docs/disabling-linters.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index c7a69e71..34979410 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -2,6 +2,26 @@ If you find you need to ignore certain errors and warnings, you will need to know the format to disable the linter rules. Below is examples and documentation for each language and the various methods to disable. +## Table of contents +- [Ruby](#ruby) +- [Shell](#shell) +- [Ansible](#ansible) +- [YAML](#yaml) +- [Python](#python3) +- [JSON](#json) +- [Markdown](#markdown) +- [Perl](#perl) +- [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) + + -------------------------------------------------------------------------------- ## Ruby From 7ad372cf8c47b8ae6465d0e0bf11327895c89937 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 10:38:33 -0500 Subject: [PATCH 15/21] adding eslint --- docs/disabling-linters.md | 68 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 34979410..7dd55f1d 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -22,6 +22,7 @@ Below is examples and documentation for each language and the various methods to - [Terraform](#terraform) + -------------------------------------------------------------------------------- ## Ruby @@ -347,15 +348,50 @@ taz = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/ -------------------------------------------------------------------------------- ## 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 +- `.github/linters/.eslintrc.yml` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.eslintrc.yml` + ### Javascript standard disable single line ### Javascript standard disable code block ### Javascript standard disable entire file @@ -363,15 +399,47 @@ taz = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/ -------------------------------------------------------------------------------- ## Typescript (eslint) +- [eslint](https://eslint.org/) + +### Typescript 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` ### Typescript eslint disable single line +```typescript +var thing = new Thing(); // eslint-disable-line no-use-before-define +thing.sayHello(); + +function Thing() { + + this.sayHello = function() { console.log("hello"); }; + +} +``` + ### Typescript eslint disable code block +```typescript +/*eslint-disable */ + +//suppress all warnings between comments +alert('foo') + +/*eslint-enable */ +``` ### Typescript eslint disable entire file +```typescript +/* eslint-disable */ +``` -------------------------------------------------------------------------------- ## Typescript (standard) ### Typescript standard Config file +- `.github/linters/.eslintrc.yml` +- You can pass multiple rules and overwrite default rules +- File should be located at: `.github/linters/.eslintrc.yml` + ### Typescript standard disable single line ### Typescript standard disable code block ### Typescript standard disable entire file From 8c027addeb149dd96787996412fad241739500e3 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 10:40:18 -0500 Subject: [PATCH 16/21] adding standard --- docs/disabling-linters.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 7dd55f1d..0155db84 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -388,13 +388,16 @@ alert('foo') - [standard js](https://standardjs.com/) ### Javascript standard Config file -- `.github/linters/.eslintrc.yml` -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.eslintrc.yml` +- 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) -------------------------------------------------------------------------------- @@ -435,14 +438,19 @@ alert('foo') -------------------------------------------------------------------------------- ## Typescript (standard) +- [standardjs](https://standardjs.com/) + ### Typescript standard Config file -- `.github/linters/.eslintrc.yml` -- You can pass multiple rules and overwrite default rules -- File should be located at: `.github/linters/.eslintrc.yml` +- There is no top level *configuration file* available at this time ### Typescript standard disable single line +- There is currently **No** way to disable rules inline of the file(s) + ### Typescript standard disable code block +- There is currently **No** way to disable rules inline of the file(s) + ### Typescript standard disable entire file +- There is currently **No** way to disable rules inline of the file(s) -------------------------------------------------------------------------------- From 3f4627503f6370b7eb489270f08f61a21b47e960 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 10:45:04 -0500 Subject: [PATCH 17/21] make pretty --- 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 0155db84..94b4de77 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -1,5 +1,5 @@ # Disabling linters and rules -If you find you need to ignore certain errors and warnings, you will need to know the format to disable the linter rules. +If you find you need to ignore certain **errors** and **warnings**, you will need to know the *format* to disable the **Super-Linter** rules. Below is examples and documentation for each language and the various methods to disable. ## Table of contents From c00ac99502780b0314fa7bbf1a5009ed0aa1794d Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 11:00:41 -0500 Subject: [PATCH 18/21] fix names --- .github/workflows/deploy-DEV.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-DEV.yml b/.github/workflows/deploy-DEV.yml index 54816cf7..e0d29f87 100644 --- a/.github/workflows/deploy-DEV.yml +++ b/.github/workflows/deploy-DEV.yml @@ -58,7 +58,7 @@ jobs: ####################### - name: Extract branch name shell: bash - run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/} | sed 's/\//_/g')" + run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/} | sed 's/[^[:alnum:]]//g'" ################################ # Run Linter against code base # From 402593e4bf05e28904a7066d2c9dc98f19726226 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 11:06:33 -0500 Subject: [PATCH 19/21] fix names --- .github/workflows/deploy-DEV.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy-DEV.yml b/.github/workflows/deploy-DEV.yml index e0d29f87..f1c7e03a 100644 --- a/.github/workflows/deploy-DEV.yml +++ b/.github/workflows/deploy-DEV.yml @@ -58,7 +58,7 @@ jobs: ####################### - name: Extract branch name shell: bash - run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/} | sed 's/[^[:alnum:]]//g'" + run: echo "::set-env name=BRANCH_NAME::$(echo ${GITHUB_REF#refs/heads/} | sed 's/[^[:alnum:]]//g')" ################################ # Run Linter against code base # From df80c350678e969fcd37d91ee1ab64ac3b1c986e Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 11:18:58 -0500 Subject: [PATCH 20/21] fix headers --- docs/disabling-linters.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 94b4de77..5a63b9e4 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -13,10 +13,10 @@ Below is examples and documentation for each language and the various methods to - [Perl](#perl) - [XML](#xml) - [Coffeescript](#coffeescript) -- [Javascript Eslint](#javascript-(eslint)) -- [Javascript Standard](#javascript-(standard)) -- [Typescript Eslint](#typescript-(eslint)) -- [Typescript Standard](#typescript-(standard)) +- [Javascript Eslint](#javascript-eslint) +- [Javascript Standard](#javascript-standard) +- [Typescript Eslint](#typescript-eslint) +- [Typescript Standard](#typescript-standard) - [Golang](#golang) - [Dockerfile](#dockerfile) - [Terraform](#terraform) @@ -347,7 +347,7 @@ taz = "some/huge/line/string/with/embed/#{values}.that/surpasses/the/max/column/ -------------------------------------------------------------------------------- -## Javascript (eslint) +## Javascript eslint - [eslint](https://eslint.org/) ### Javascript eslint Config file @@ -384,7 +384,7 @@ alert('foo') -------------------------------------------------------------------------------- -## Javascript (standard) +## Javascript standard - [standard js](https://standardjs.com/) ### Javascript standard Config file @@ -401,7 +401,7 @@ alert('foo') -------------------------------------------------------------------------------- -## Typescript (eslint) +## Typescript eslint - [eslint](https://eslint.org/) ### Typescript eslint Config file @@ -437,7 +437,7 @@ alert('foo') -------------------------------------------------------------------------------- -## Typescript (standard) +## Typescript standard - [standardjs](https://standardjs.com/) ### Typescript standard Config file From abe07e93a4d0f78a46ad747f71f80769a9e0ea07 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Thu, 23 Apr 2020 11:22:10 -0500 Subject: [PATCH 21/21] fixed names --- docs/disabling-linters.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/disabling-linters.md b/docs/disabling-linters.md index 5a63b9e4..525471b6 100644 --- a/docs/disabling-linters.md +++ b/docs/disabling-linters.md @@ -1,8 +1,8 @@ -# Disabling linters and rules +# Disabling linters and Rules If you find you need to ignore certain **errors** and **warnings**, you will need to know the *format* to disable the **Super-Linter** rules. Below is examples and documentation for each language and the various methods to disable. -## Table of contents +## Table of Linters - [Ruby](#ruby) - [Shell](#shell) - [Ansible](#ansible)