Commit graph

980 commits

Author SHA1 Message Date
Rui Chen
e6445c358f replace kubeval with kubeconform
Signed-off-by: Rui Chen <rui@chenrui.dev>
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-16 21:14:13 -05:00
Marco Ferrari
81c370a611
Validate if we the test suite runs both good and bad tests (#3811)
Also, remove the ansible-lint configuration file because we can rely on the default one
2023-01-11 17:24:48 +01:00
Marco Ferrari
053a52e2f6
Fix Google Java Format tests and return code, and show output only if changed (#3810) 2023-01-11 15:52:36 +01:00
Jon Hamm
aad87c569b add jenkinsfile to groovy files 2023-01-05 09:52:29 -05:00
Brett Logan
cedda7c156 Revert psd1 extension change and ignore PSMissingModuleManifestField
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-05 09:46:51 -05:00
Brett Logan
f3c9bbd0ef Use canonical PSScriptAnalyzer setting file extension
The PSScriptAnalyzer expects a text file, not a PowerShell extension
on the filename. The latest version of powershell now respects this
rule and breaks testing as the settings file doesn't meet the requirements
of the linter.

Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-05 09:46:51 -05:00
Marco Ferrari
91a4987b95 Reduce ansible-lint verbosity 2023-01-05 09:42:40 -05:00
Marco Ferrari
419a547ff4 Don't show Gitleaks banner in output to make it more concise 2023-01-05 09:42:40 -05:00
Marco Ferrari
f0fe1c900b Conditionally create log file 2023-01-05 09:42:11 -05:00
Algin Maduro
885744f3f4 fix failing lint 2023-01-04 22:44:16 -05:00
Algin Maduro
50be96aaf9 review comments 2023-01-04 22:44:16 -05:00
Algin Maduro
9f4a208eb5 Add terraform fmt support 2023-01-04 22:44:16 -05:00
Brett Logan
d2600eb1bd Fix shellcheck error
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-04 01:45:10 -05:00
Brett Logan
ba31e65dd4 Ignore warning in shellcheck
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-04 01:45:10 -05:00
Brett Logan
6f804d1b87 Add GITHUB_ACTIONS_COMMAND_ARGS environment variable
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-04 00:35:25 -05:00
Brett Logan
24b9c2cbb4 Revert Dart update
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-03 23:54:16 -05:00
Brett Logan
7fa037d7e8 Remove retired Dart Analyze flag
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-03 23:54:16 -05:00
Brett Logan
088b69df6f Fix dart analyze
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-03 23:54:16 -05:00
Christoph Höger
adbf28f42d Use git check-ignore instead of a (incomplete) list of ignored files
The list-based method breaks down in case of ignored folders:
If .gitignore contains foo/, foo/bar.py is still checked.

Signed-off-by: Christoph Höger <christoph.hoeger@piano.io>
2023-01-03 20:14:39 -05:00
Marco Ferrari
8607445fb4 Throw a fatal error if tflint --init fails 2022-10-09 19:31:12 -04:00
Marco Ferrari
2053621293
Use TFLINT_LOG environment variable instead of the deprecated --loglevel option (#3414) 2022-10-05 13:27:30 +00:00
Marco Ferrari
808436342f
Build process improvements (#3367)
* Fix issues with the container image build

* Fix asl-validator version check

* Disable filename rule when running ktlint tests

* Bump asl-validator from 2.2.1 to 3.0.8 in /dependencies

Bumps [asl-validator](https://github.com/ChristopheBougere/asl-validator) from 2.2.1 to 3.0.8.
- [Release notes](https://github.com/ChristopheBougere/asl-validator/releases)
- [Commits](https://github.com/ChristopheBougere/asl-validator/compare/2.2.1...3.0.8)

---
updated-dependencies:
- dependency-name: asl-validator
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Show errors when using curl to call the status API

* Make the build more reproducible

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-28 08:45:01 -05:00
Marco Ferrari
2d7b73b7b9
Change directory to ANSIBLE_DIRECTORY before running ansible-lint and enable autodetection (#3350)
* Change directory to ANSIBLE_DIRECTORY before running ansible-lint

* move log so we see it

* Don't pass the directory to enable autodetection
2022-09-27 07:59:15 +00:00
Brett Logan
c900dee197
Update linter.sh (#3251) 2022-08-18 12:22:39 -05:00
Nicolas Vuillamy
f1196a50f6
Remove npm-groovy-lint custom handling as it now accepts files as arguments (#3250) 2022-08-15 12:49:50 -05:00
Max Thomson
02e2e313f9
Fix secondary rules extension (#3136) 2022-07-13 13:20:10 -05:00
Guilhem Lettron
34cfb29962
fix(go): use --fast golangci-lint option (#3043)
All tests can't be run agaist single files.
golangci-lint have a dedicated list of linter adapted to single file
usage.
https://github.com/golangci/golangci-lint/issues/1574

Signed-off-by: Guilhem Lettron <guilhem@barpilot.io>
2022-06-16 15:11:28 -05:00
Lukas Gravley
53ff7db7b5
Rubocop 1.30 (#2964)
* update rubocop

* adding unrec cops

* fix space
2022-05-27 15:45:59 -05:00
Lukas Gravley
bb6a68e80b
adding log level (#2959)
* adding log level

* Update lib/functions/detectFiles.sh

Co-authored-by: Tibo Delor <delor.thibault@gmail.com>

* fix space

Co-authored-by: Tibo Delor <delor.thibault@gmail.com>
2022-05-26 09:33:19 -05:00
Lukas Gravley
431ee7836e
Release 4.9.3 (#2948)
* Update action.yml

* Update action.yml

* set flag to solve local changes

* spaces
2022-05-24 13:44:12 -05:00
Lukas Gravley
6c24367c7b
dumb issue (#2810) 2022-04-20 09:04:58 -07:00
Lukas Gravley
cb3c5472d8
adding safe (#2806)
* adding safe

* make a var

* so dumb

* so dumber

* so dumberer

* so dumbererer

* so dumberererer

* both
2022-04-19 15:12:46 -07:00
Lukas Gravley
14eb37a88c
adding addional command (#2711)
* adding addional command

* shell format
2022-03-28 13:32:04 -05:00
Stephen Abbene
32eb1cccda
Add Perl::Critic::Community and PERL_PERLCRITIC_OPTIONS to allow passing command line options to perlcritic (#2684)
Co-authored-by: Stephen Abbene <sabbene@users.noreply.github.com>
2022-03-28 08:56:50 -05:00
Alexandre Favre
f72905b7cc
Add KOTLIN_ANDROID to LANGUAGE_ARRAY (#2689) 2022-03-28 08:55:45 -05:00
Alexandre Favre
edc7095b4b
Add Android support for Kotlin (#2670)
* Fix Kotlin good test case (incorrect filename)

* Add Android support for Kotlin

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2022-03-24 15:39:52 -05:00
Marco Ferrari
c5e5046b8b
Don't override the PATH when installing Psalm (#2643) 2022-03-23 11:43:28 -05:00
Masaya Suzuki
e277edca06
Use ts-standard instead of standard as TYPESCRIPT_STANDARD (#2614)
* Use ts-standard instead of standard as TYPESCRIPT_STANDARD

* Add ts-standard

* Update test case

* Update test case

* Add tsconfig.json

* Add tsconfig.json environment value

* Fix "TypeScript"

* Fix package version

* Fix package version

* Fix package version

* Fix package version

* Fix settings

* Remove config file env

* Fix version

* Fix eslintrc

* Fix project path

* Fix project path

* Fix setting

* Fix env

* Add .eslintrc.yml for ts-standard

* Fix README

* Fix settings

* Change include paths

* Change include paths

* Change include paths

* Change include paths

* Fix dependencies

* Fix dependencies

* Fix dependence versions
2022-03-16 10:21:57 -05:00
Marco Ferrari
4b16b5b473
Lint the whole Ansible directory (#2576) 2022-03-14 20:47:04 +01:00
Marco Ferrari
f26ace31b9
Check for kind when detecting Kubernetes files (#2612)
* Check for kind when detecting Kubernetes files

* Fix condition

* Check conditions one by one

* Formatting

* Formatting
2022-03-14 09:22:58 -05:00
Marco Ferrari
d7cefe279b
Don't populate FILE_ARRAY_JSCPD with single files when scanning the whole codebase (#2580) 2022-03-14 09:22:23 -05:00
Marco Ferrari
244f2daed2
Echo output only when necessary (#2575)
Co-authored-by: Brett Logan <lindluni@github.com>
2022-03-01 20:50:47 +01:00
Colwyn Fritze-Moor
58e42fe112 fix: dont print stdout from terraform get 2022-02-22 01:19:52 -05:00
Colwyn Fritze-Moor
ecb6625a21 fix: enable tflint module mode 2022-02-22 01:19:52 -05:00
Colwyn Fritze-Moor
0741c52808 fix: cd to terraform directory before running get 2022-02-22 01:19:52 -05:00
Frantisek Sumsal
e1f3ad24b3
fix: don't check the $GITHUB_TOKEN if multi-status is disabled (#2464)
Since the $GITHUB_TOKEN is required only for the multi-status feature to
work, avoid printing an error in case the feature is explicitly
disabled and we don't pass $GITHUB_TOKEN to Super-Linter.

i.e. don't print:

```
2022-02-13 14:24:13 [ERROR]   Failed to get [GITHUB_TOKEN]!
2022-02-13 14:24:13 [ERROR]   []
2022-02-13 14:24:13 [ERROR]   Please set a [GITHUB_TOKEN] from the main workflow environment to take advantage of multiple status reports!
```

when `MULTI_STATUS=false`.
2022-02-14 09:37:53 -06:00
Colwyn Fritze-Moor
c1ded5ed7d
fix: tflint should clean up after itself (#2459)
* fix: tflint should clean up after itself

* feat: add cache for tflint
2022-02-14 09:23:17 -06:00
Colwyn Fritze-Moor
eb4aad643b
feat: add SSH key support (#2454)
* feat: add support for ssh keys and github.com connections

* refactor: allow github.com setup and update docs

* docs: add note about using ssh_key

* fix: run shfmt

* fix: add language to ssh key fence

* fix: make ssh setup script executable

* fix: gitleaks wins, openssh example removed

* notes

* docs: make the docs a little more clear

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2022-02-09 15:24:57 -06:00
Lukas Gravley
28de408b0e
adding lind command output to success (#2399) 2022-01-27 17:28:11 -06:00
Lukas Gravley
d92f3364de
adding flag for error on warning (#2397)
* adding flag for error on warning

* remove bug
2022-01-27 10:47:52 -06:00
Barry Pollard
19abf45423
Correct SQLFluff config filename (#2366) 2022-01-24 09:01:37 -06:00
Ross Smith II
ef8f202ea2
fix: Output gitleaks version (#2363) 2022-01-20 14:06:10 -06:00
Barry Pollard
3d54fce1f0
Allow SQLFluff configuration file to be used from standard Super Linter location (#2361) 2022-01-20 09:02:30 -06:00
Lukas Gravley
591688d57d
adding perl and python (#2360) 2022-01-19 11:09:26 -06:00
Colwyn Fritze-Moor
09b571b1b0
feat: add support for Terraform modules in tflint (#2297)
* fix: support tflint relative module references

* chore: add test for relative module imports

* chore: add terraform binary

* chore: move tests

* chore: add newlines to tests

* chore: add newlines to tests

* refactor: move terraform get

* refactor: put terraform get back where it was

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2022-01-06 11:04:10 -06:00
Brett Logan
35d23ba664
Revert "Add find-unicode-control2 (#2286)" (#2299)
This reverts commit 46b9e49099.
2022-01-06 11:00:57 -06:00
Lukas Gravley
42981a4a7a
Update additional scala extensions (#2296)
* Update buildFileList.sh

add new extension

* fix space

* turn this down a hair

* update

* fix rule

* fixed dumb stuff

* fix indent

* hangry
2022-01-06 09:28:26 -06:00
r-bennett
be2b62efe9
Use --strict to report yaml linting warnings (#2295) 2022-01-05 12:08:25 -06:00
Masaya Suzuki
46b9e49099
Add find-unicode-control2 (#2286)
* Add find-unicode-control2

* make version easier

* cleaner version

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2022-01-04 10:07:45 -06:00
Iori IKEDA
2d82178aee
add protolint config (#2252) 2022-01-03 11:30:56 -06:00
Marco Ferrari
da61f6135a
Reduce duplication using a single Dockerfile (#2178)
* Reduce duplication using a single Dockerfile

* Remove slim Dockerfile

* Update PROD and RELEASE workflows

* Fix apk package installing

* Force link creation

* Don't check if the versions file exist

* Fix BUILD_DATE

* Fix BUILD_DATE

* Fix BUILD_DATE

* Fix BUILD_DATE
2021-12-10 10:15:12 -06:00
Marco Ferrari
e4b08ec842
Lint the whole code base with JSCPD (#2180)
* Lint the whole code base with JSCPD if VALIDATE_ALL_CODEBASE is true

* Use VALIDATE_JSCPD_ALL_CODEBASE

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-12-08 14:28:30 -06:00
dependabot[bot]
de35dfbf5a
Bump zricethezav/gitleaks from v7.6.1 to v8.0.4 (#2188)
* Bump zricethezav/gitleaks from v7.6.1 to v8.0.4

Bumps zricethezav/gitleaks from v7.6.1 to v8.0.4.

---
updated-dependencies:
- dependency-name: zricethezav/gitleaks
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixing command for after 8.x

* better regex

* better verbose

* remove file

* fixed logic

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-12-08 14:28:11 -06:00
Marco Ferrari
ee99da290b
Uninstall Dockerfilelint (#2195)
* Uninstall Dockerfilelint

* remove dockerfilelint packages

* trying ca-certs

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-12-08 09:53:05 -06:00
Marco Ferrari
071bfadcf0
Add RUST_2021 test and fix RUST_2021 file list (#2215)
* Add RUST_2021 test

* Add files to ARRAY_RUST_2021
2021-12-07 15:55:54 -06:00
Marco Ferrari
f90bf96db8
Install R directly and don't report npm-groovy-lint usage stats (#2202)
* Install R directly

* Don't install zip

* Copy etc/R

* Move back to /home/r-library

* Copy directory contents

* Copy files

* mkdir

* recursive copy

* copy -r

* Revert R etc

* Don't create etc dir

* Disable ClassNameSameAsFilename rule

* insight kills

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-12-07 12:10:26 -06:00
Antonio Yang
1d4680e2a7
Update rustfmt with 2021 edition (#2196) 2021-12-07 11:18:34 -06:00
Lukas Gravley
fb82126082
Typescript prettier (#2121)
* adding typescript prettier

* adding typescript prettier

* fix scala
2021-11-12 10:25:32 -06:00
Jake Herbst
897185a4aa
Adding scalafmt (#2053)
* Adding scalafmt

* add it

Co-authored-by: Jake Herbst <jherbst@rsglab.com>
Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-11-10 12:28:50 -06:00
Rohan Goel
81ba7d8d56
only show errors for openapi linter (#2112)
Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-11-10 09:41:26 -06:00
Brett Logan
47bd074778
Update Deps (#2107)
* Fix rakudo

* Update deps

* wants percent

* fix style

* somehow we got a space

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-11-09 14:35:36 -06:00
Konrad Pagacz
a2193cb9f6
fix(R linting): try installing the R package before linting R language (#1911)
* fix(R linting): try installing the R package before linting R language

* the tool used to lint the R language gives false positives for files inside an R library, which is not installed
* this change tries to naively install the package in the linted directory

Resolves #1910

* fix code

* fixed it

* fixed it

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-10-05 08:46:38 -05:00
Masaya Suzuki
fafdcd214e
Add textlint (#2021)
* Add textlint

* Fix by textlint

* Fix package-lock.json

* Fix package-lock.json
2021-10-05 08:29:05 -05:00
Tomas Dabasinskas
192b06392a
Improve GITHUB_API_URL default value handling (#2031)
* Improve GITHUB_API_URL default value handling

GitHub Actions [already has](https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables) `GITHUB_API_URL` environment variable which contains GitHub API URL. We should be smart about overriding it and, if it exist and already has value, we should not override it.

* Strip slash from GITHUB_API_URL

* Update linter.sh

* Update linter.sh

* make shfmt happy

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-10-04 09:53:43 -05:00
Lukas Gravley
57e0530d1b
cleaner (#2008)
* cleaner

* fix bad name

* fix name

* adding flag

* fix links

* noise

* fix rules

* fix to warn

* remove textlint
2021-10-01 12:41:13 -05:00
Masaya Suzuki
3472ac360c
Add textlint (#2006)
* Add textlint

* Add new final newline

* Validate only markdown files

* txt -> md
2021-09-30 13:40:44 -05:00
guotongfei
1afc7f8409
Enhancement: Add support for google-java-format (#1969)
* Add support for google-java-format

* adding tests and array

* fix comma

* Update linter.sh

* get it in order

* fix hava version

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-09-28 17:09:21 -05:00
Admiral Awkbar
ebd175a476 Merge branch 'master' of https://github.com/github/super-linter 2021-09-27 12:54:30 -05:00
Admiral Awkbar
6e11f263e2 fix gitleaks 2021-09-27 12:54:24 -05:00
dependabot[bot]
eef7b50ea3
Bump snakemake from 6.8.0 to 6.8.1 in /dependencies (#2004)
* Bump snakemake from 6.8.0 to 6.8.1 in /dependencies

Bumps [snakemake](https://github.com/snakemake/snakemake) from 6.8.0 to 6.8.1.
- [Release notes](https://github.com/snakemake/snakemake/releases)
- [Commits](https://github.com/snakemake/snakemake/compare/v6.8.0...v6.8.1)

---
updated-dependencies:
- dependency-name: snakemake
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixed dead var

* typo in name

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-09-27 11:02:18 -05:00
Masaya Suzuki
0e1a1e50d6
Add Gitleaks for secret scanning (#1951)
* Add actionlint

* adding gitleaks

* rm secretlint

* Update .gitleaks.toml

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-09-27 09:32:18 -05:00
Ioan Rogers
c93f6d8e58
Support Containerfile as alternative to Dockerfile (#1987) 2021-09-21 09:03:34 -05:00
Lukas Gravley
a3cce70fa3
adding composer code (#1950)
* adding composer code

* making it better

* adding composer bin

* adding some logic

* make shellfmt happy
2021-09-10 09:43:20 -05:00
Tibo Delor
a3ad489783
Match AWS States file using "States" JSON key (#1949)
* Match AWS states file using "States" key

Matching only on `"Resource": "arn` is too wide and will match also aws json policy files

* Update detectFiles.sh

* spacing

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-09-09 13:03:41 -05:00
Lukas Gravley
c649496209
suppress warn messages (#1943) 2021-09-07 10:12:49 -05:00
JonZeolla
d90f45a3cc
Install type stubs at mypy runtime (#1937) 2021-09-07 08:56:30 -05:00
Kurt von Laven
8227f79074
Add a template config file for ShellCheck (#1900)
* Improve wording of LINTER_RULES_PATH docs (#1634).

* Add a template config file for ShellCheck (#1633).

Instruct ShellCheck to search SCRIPTDIR, the directory that the script
being linted is in, for other scripts that are sourced. Otherwise, the
commonly-used source command results in linter error SC1091. See
https://github.com/koalaman/shellcheck/wiki/SC1091 for more details.

* fix line ending

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-08-30 11:19:56 -05:00
Lukas Gravley
5f65429f2c
adding tflint (#1899)
* adding tflint

* fixed array

* i thought this was fixed
2021-08-30 09:47:50 -05:00
Lukas Gravley
148622b273
Sqlfluff (#1834)
* adding sqlfluff

* adding sqlfluff

* update test

* adding sql file array
2021-08-05 15:32:27 -05:00
Xiao Liang
f6910e3ee9
feat: support bats (#1778)
Support linting of bats files by identifying them as shell scripts (they actually are)
2021-07-19 09:30:44 -05:00
Lukas Gravley
ab24b82199
Adding actionlint (#1775)
* Adding action lint

* adding tests

* adding tests

* Update Dockerfile

Co-authored-by: Masaya Suzuki <15100604+massongit@users.noreply.github.com>

* cleanup name

* fix test

* typo

* fix file name

* fix our own errors

* more cleanup

* angry

* make it happy

* stop double jobs

Co-authored-by: Masaya Suzuki <15100604+massongit@users.noreply.github.com>
2021-07-19 09:28:49 -05:00
Lukas Gravley
1481793072
adding clang (#1762)
* adding clang

* fix hado

* adding files

* fixing naming

* fixing test

* fixing space

* removing config file

* fix tests

* fix tests

* fix file array
2021-07-14 14:43:10 -05:00
Aldana Vaca
8b75fbf345
Adding terrascan config file (#1761)
* adding terrascan config file

* fix line ending

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-07-14 10:20:24 -05:00
Thomas Iguchi
fad8d1cde2
Added support for changing Checkstyle rules file name (#1760)
Resolves https://github.com/github/super-linter/issues/680
2021-07-14 09:45:07 -05:00
Lukas Gravley
b3e0c02dc5
yamllint format (#1754)
* standard

* parsable
2021-07-13 11:04:58 -05:00
Lukas Gravley
100c674c6d
adding tflint config (#1753) 2021-07-13 09:44:27 -05:00
Lukas Gravley
d24eb27b4c
move from jsonlint to eslint (#1752)
* move from jsonlint to eslint

* move from jsonlint to eslint

* adding test
2021-07-13 09:10:37 -05:00
Ayodeji Osagie
f187b0b3ab
Fix terragrunt file picker from selecting packer files (#1707)
Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-06-28 08:40:31 -05:00
Stepan Koltsov
e059100991
Ignore files marked with @generated marker (#1689)
* Ignore files marked with @generated marker

`@generated` marker is used by certain tools to understand that the
file is generated, so it should be treated differently than a file
written by a human:
* these files do not need to be reformatted,
* diffs in these files are less important,
* and linters should not be invoked on these files.

This PR proposes builtin support for `@generated` marker (and
`@not-generated` marker to mark file as not generated when it
contains `@generated` marker, like `README.md`).

I have not found a standard for a generated file marker, but:
* Facebook [uses `@generated` marker](https://tinyurl.com/fb-generated)
* Phabricator tool which was spawned from Facebook internal tool
  [also understands `@generated` marker](https://git.io/JnVHa)
* Cargo inserts `@generated` marker into [generated Cargo.lock files](https://git.io/JnVHP)

Super-linter supports regex includes and excludes, but they are
harder to maintain (each repository needs to be configured) than
patching the tools which generate the files.

My personal story is that I maintain rust-protobuf crate, which
started emitting `@generated` markers [six years ago](https://git.io/JnV5h)
after a request of a Phabricator user.

Test Plan:

Create a test file `test.sh`:

```
echo $a
```

Run:

```
docker run -e RUN_LOCAL=true -v $HOME/tmp/g:/tmp/lint super-linter-test
```

Result is:

```
In /tmp/lint/test.sh line 1:
echo $a
^-- SC2148: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
     ^-- SC2154: a is referenced but not assigned.
     ^-- SC2086: Double quote to prevent globbing and word splitting.
...
2021-06-22 23:46:16 [ERROR]   ERRORS FOUND in BASH:[1]
```

Now add `@generated` to the file and run again:

```
2021-06-22 23:47:13 [NOTICE]   All file(s) linted successfully with no errors detected
```

Additionally, add `@not-generated` in addition to `@generated`, and
linter error pops up again.

* cleanup

* remove space

* fix non utf return

* fix non utf return

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-06-28 07:59:11 -05:00
Lukas Gravley
c4280ea4e1
LINTER_RULE_PATH fix (#1649)
* adding root code

* removbe a typio
2021-06-10 13:09:24 -05:00
Lukas Gravley
2c135d4a17
adding rules file (#1644)
* adding rules file

* fix naming

* cleanup

* make smart

* fixing the make

* adding template

* white space

* not sure how i got windows

* found the space
2021-06-09 11:53:11 -05:00
Lukas Gravley
4faa6433ab
adding find algorithm (#1640)
* adding find

* add default value
2021-06-08 10:40:59 -05:00
Lukas Gravley
6ce478c991
Kube (#1609)
* adding var

* adding var

* bug

* spacing

* better name
2021-06-01 15:04:25 -05:00
Lukas Gravley
ebf6194d0e
wildcard search (#1608) 2021-06-01 12:17:13 -05:00
Lukas Gravley
83badbc49c
Image 4.0 (#1565)
* adding new one...

* adding automation

* linter

* pull apart for faster builds

* maybe

* update automation

* fix that

* prime is smart

* fixed it

* quotes

* fix build image

* inpec

* typo

* forgot backslash

* fixed hairbrain logic

* this should help cleanup

* i hate r

* order

* maybe fix r

* maybe fix r

* update readme

* remove spaces

* update
2021-05-25 10:14:43 -05:00
DanEmord
3dc85fc3bc
Allow ansible-lint with git diffs (#1554)
* Allow ansible-lint with git diffs

super-linter checks the path of the file in lib/functions/detectFiles.sh to determine whether the file is an ansible playbook. When VALIDATE_ALL_CODEBASE=true, a list of absolute paths is generated which matches the expected path but when VALIDATE_ALL_CODEBASE=false, a list of relative paths is generated so no files are "detected" as ansible playbooks. This change outputs everything as an absolute path so diffs will also work.

* fix quotes

* Include eval to interpret pipe in cmd substitution

* more quotes

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-05-12 09:59:31 -05:00
Lukas Gravley
3e0bd7fff4
Eslint for json jsonc and json5 (#1524)
* adding it

* fix typo

* fix tests

* adding back jsonlint

* adding back jsonlint

* fix spacing

* found the typo

* add tests

* adding rules for json

* add to local
2021-05-11 10:54:58 -05:00
Lukas Gravley
5d96acadf1
remove more dead weight (#1530)
* remove more dead weight

* more cleaner

* falling into place

* tie dotnet to version

* new low
2021-05-10 09:58:30 -05:00
Lukas Gravley
5d2ea81f00
Cpp (#1492)
* adding cpp

* adding cpp

* tests

* make test better

* fix test
2021-05-04 13:24:41 -05:00
Lukas Gravley
1a00fc3790
adding fixes (#1516)
* adding fixes

* happy

* happy

* fix local files

* fix spacing

* i hate space

* spacing pt3 the space wars

* further down the bunny trail
2021-05-04 11:33:21 -05:00
Lukas Gravley
72cbbfc4e5
Inspec additional Tests (#1497)
* adding tests

* adding more

* cleanup vars

* dumb

* dumb

* fix r lib

* adding test

* quotes

* quotes

* more test

* adding brackets

* typos

* dumb

* slashes
2021-05-03 16:30:02 -05:00
dependabot[bot]
63caefd599
Bump alpine/terragrunt from 0.14.5 to 0.14.7 (#1230)
* Bump alpine/terragrunt from 0.14.5 to 0.14.7

Bumps alpine/terragrunt from 0.14.5 to 0.14.7.

Signed-off-by: dependabot[bot] <support@github.com>

* set log level to error

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
Co-authored-by: Marco Ferrari <ferrari.marco@gmail.com>
2021-04-30 14:56:47 -05:00
Lukas Gravley
5f5904883d
remove tap and tests (#1496)
* remove tap and tests

* fix proto

* remove dumb test
2021-04-30 12:46:24 -05:00
Marco Ferrari
0c8db849aa
Implement a test suite with InSpec (#1466)
* Implement a test suite with InSpec

* make ruby happy

* adding file

* Fix inspec and add make target

* Run inspec

* adding binaries

* make ruby happy

* fix linter order

* cleanup

* adding version check

* adding notes

* cleanup

* cleanup

* fixed r test

* fixed copy paste

* dynamic tests

* fix hash

* fix notation

* docker ps

* Fix makefile

* Fix makefile

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-04-30 11:29:15 -05:00
Lukas Gravley
e0e4a67f3a
Certs (#1470)
* adding cert

* update readme

* typo

* make exec

* spaces

* adding better way

* adding example

* make shell happy

* fix space

* adding notes

* bad var

* duh
2021-04-26 09:00:42 -05:00
Marco Ferrari
527c5a3986
Generate a code coverage report (#1353)
* Generate a code coverage report

* make linters happy

* adding action and badge

* no report for me

* Upload the test report

* adding folders

* spaces not tabs

* makefiles love tabs

* spacing is important

* rawr

* Fix makefile

* Add diagnostic info

* Set UID and GID

* Make info

* Add docker images in diagnostic info

* Move info before testing the local action

* Add missing -C to git diff-tree

* Reset ownership

* Add missing quotes

* Sudo

* Attempt to fix ARM test

* Attempt to fix go test

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-04-22 13:56:18 -05:00
Erik Godding Boye
a908937c78
Add new ENV VAR to set ansible-lint config file (#1424) 2021-04-11 20:24:43 -07:00
Lukas Gravley
08a586cf3b
adding Python MyPy (#1401)
* adding fun

* fix whitespace

* adding tests

* adding the array

* bug in file name

* fix tap

* makes no sense

* adding the hammer

* adding some extra protbuf
2021-03-24 14:00:23 -05:00
Andreas Fritzler
1367534603
Allow to override github api url (#1395) 2021-03-23 13:26:14 -05:00
Lukas Gravley
3d39df7f0e
adding it (#1396)
* adding it

* i kant read

* make go go away
2021-03-23 12:02:16 -05:00
Lukas Gravley
bf70afb2a9
Fix Root path for rust (#1373)
* fix path

* quiet

* rules for ktlint

* correct name
2021-03-17 13:28:51 -05:00
Andreas Fritzler
130b6ac1a5
Added support for custom github domain for status target url (#1367) 2021-03-15 15:19:54 -05:00
Tom Pansino
7b8e3189d8
Support custom markdownlint rules (#1306)
* Support custom rules with markdownlint

* Add MARKDOWN_CUSTOM_RULE_GLOBS to README.md

* Fix shellcheck issues and use bash array for globs

* Fix shfmt issues

Co-authored-by: Gabriel Diaz <gabo.fdc@gmail.com>
2021-03-10 09:06:06 -06:00
Gabriel Diaz
07a16ed119
Fix to lint other .env.* files (#1336) 2021-03-10 08:38:31 -06:00
Antonio Yang
60e2561b15
Add clippy for rust (#1277)
* Add clippy for Rust

* Update ARM test cases

- fix arm good test case
- update tap report

* Lint github workflows release config
2021-03-08 14:13:04 -06:00
Gabriel Diaz
f58e607c4b
Fix buggy diff cmd (#1314)
* Fix buggy diff cmd

* Fix new line for diff cmd output

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-03-05 11:25:31 -06:00
Kim SeungSu
68c8bf9f11
fix, checkout DEFAULT_BRANCH for diff base (#1308) 2021-03-05 08:57:16 -06:00
Gabriel Diaz
11720172cb
Fix get file diff on pr event (#1305)
* Fix pr event sha

* Improve cmd

* Fix space
2021-03-04 13:51:44 -06:00
Gabriel Diaz
46df94844c
Add debug info for multi status api calls (#1287)
* Add debug info for multi status api calls

* Add test for clean action

* Add more verbose

* Test in action context

* Test use local build as action

* Improve debug for raw file array

* Fix shallow fetch

* Fix error messages on diff cmd

* Changed repeated code to function

* Fix quotes
2021-03-02 08:29:12 -06:00
Max Held
0b756c57e8
only error on rstats lintr errors, not all lints (#1233)
* only error on lintr errors

* ensure that dockerfile includes purrr

* update tap snapshot

* add actual lint error

* add snapshot for actual error

Co-authored-by: Gabriel Diaz <gabo.fdc@gmail.com>
Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-02-26 08:49:08 -06:00
Antonio Yang
f47b363f71
Add rustfmt for Rust (#1250)
* Add linter for Rust

- add 2015 edition
- add 2018 edition

* Add tap reports

- add tap reports
- fix good test case

* 1 command=lesslayers

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-02-26 08:47:21 -06:00
Gabriel Diaz
71d36c41c2
Add logic to check command output before maping the files (#1259) 2021-02-25 18:15:51 +00:00
dependabot[bot]
7c4842d2d2
Bump ansible-lint from 5.0.1 to 5.0.2 in /dependencies (#1248)
* Bump ansible-lint from 5.0.1 to 5.0.2 in /dependencies

Bumps [ansible-lint](https://github.com/ansible-community/ansible-lint) from 5.0.1 to 5.0.2.
- [Release notes](https://github.com/ansible-community/ansible-lint/releases)
- [Commits](https://github.com/ansible-community/ansible-lint/compare/v5.0.1...v5.0.2)

Signed-off-by: dependabot[bot] <support@github.com>

* fix ansible

* fix ansible

* looking

* maybe baby

* adding details

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-02-24 07:45:39 -06:00
Eric Nemchik
389fe11f9b
Use git ls-tree to build file list (#1192)
* Ignore files that are ignored by Git (#1185)

* Ignore files that are ignored by Git

* Add missing continue statement

* Fix linting errors

* Fix linting errors

* like it

* like it

* Add the IGNORE_GITIGNORED_FILES variable

* Fix setting the Ansible directory when running tests

* Fix var export

* Update linter.sh

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>

* Remove RenameTestFolder

* Update action.yml

* removing the dockignore from our test...

* fixed it

Co-authored-by: Marco Ferrari <ferrari.marco@gmail.com>
Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-02-23 11:51:34 -06:00
Lukas Gravley
9bfc6158b9
Fix Tap report spacing (#1240)
* cleaner

* fix go

* fix go

* going ham

* fix typo

* fix typo

* fix typo

* fix mapfile

* fix mapfile

* fixed spacing
2021-02-22 11:28:49 -06:00
Marco Ferrari
b6bbc88e8e
Ignore files that are ignored by Git (#1185)
* Ignore files that are ignored by Git

* Add missing continue statement

* Fix linting errors

* Fix linting errors

* like it

* like it

* Add the IGNORE_GITIGNORED_FILES variable

* Fix setting the Ansible directory when running tests

* Fix var export

* Update linter.sh

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-02-18 12:15:50 -06:00
dependabot[bot]
570a113901
Bump cljkondo/clj-kondo from 2021.01.20-alpine to 2021.02.13-alpine (#1213)
* Bump cljkondo/clj-kondo from 2021.01.20-alpine to 2021.02.13-alpine

Bumps cljkondo/clj-kondo from 2021.01.20-alpine to 2021.02.13-alpine.

Signed-off-by: dependabot[bot] <support@github.com>

* fix ascii

* fix spacing

* removing non ascii chars

* fixed typo

* fixed typo

* add location

* flaky go

* flaky go

* flaky ansible

* fix groovy

* update

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2021-02-18 09:59:43 -06:00
Jeremiah
00c70f4b2c
Update snakefmt to 0.3.0 and black to 20.3 (now supported by snakefmt). (#1212)
* Update snakefmt to 0.3.0 and black to 20.3 (now suppored by snakefmt).

* Update pipfile for ansible 5.0

* Align pipfile python with Docker alpine image

* Explicitly pin python minor version in dockerfile

* Ansible updates

* Add missing cryptography dependencies

* Eliminate deprecated ansible syntax

* Update expected output for ansible

* Try to add regex to handle test run length

* Yaml doc syntax fixes

* Flailing attempt at tap wildcard

* Catch dynamic output from ansible-lint

* Update regex

* Fix regex statement

* Fix tap output

* Update go error message (issue from master branch)

* Fix regex

* Ansible strikes back

* Fix tap output

* Fix json tap

* Update r tap
2021-02-17 07:32:40 -06:00
Thorbjörn 'Puggan' Sundragon
3abe0fc5e6
Move FILTER_REGEX_INCLUDE and FILTER_REGEX_EXCLUDE test (#1022)
* Move FILTER_REGEX_INCLUDE AND FILTER_REGEX_EXCLUDE before checking filetype

* missing continue, and a lint error

Co-authored-by: Marco Ferrari <ferrari.marco@gmail.com>
2021-02-03 09:52:12 -06:00
Marco Ferrari
ab8780a58f
Install, configure, and run jscpd. Add missing tests (#1032)
Co-authored-by: Gabo <gabo.fdc@gmail.com>
Co-authored-by: Matt Desmond <beardofedu@github.com>
Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-01-27 20:47:34 +01:00
Ishan Goel
c9471d70eb
Linter command output on newline (#1146)
When lint fails, print command output on a newline surrounded by "------"

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
Co-authored-by: Gabriel Diaz <gabo.fdc@gmail.com>
2021-01-20 12:44:30 -06:00
Lukas Gravley
e11786a54c
Adding Flag for Possum (#1149)
* adding a bad feature

* fix hadolint
2021-01-19 11:03:14 -06:00
Gabriel Diaz
88645c0977
Move switch back to code branch (#1139)
Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-01-12 12:55:02 -06:00
Lukas Gravley
8c3fefc145
fix logic for docker (#1119)
* fix logic

* remove space
2021-01-04 14:25:33 -06:00
Aaron Sky
328b17bbc8
Improved ANSIBLE_DIRECTORY validation to support the repository root (#1111)
* Improved ANSIBLE_DIRECTORY validation to support the repository root

Fixes #1110, which prevents linting playbooks at the root of the repository from being supported.

* Trim whitespace

* Remove undesired extra validation condition

Addressing review feedback from @ ferrarimarco

* Avoid mutating ANSIBLE_DIRECTORY beyond the extent that was already in place

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2021-01-04 13:38:46 -06:00
Lukas Gravley
193de39afd
Adding support for Prettier (#1118)
* adding it

* fix spaces

* vars were backwards

* remove prettier from function test
2021-01-04 11:07:57 -06:00
Gabriel Diaz
3ce39c07d9
Check OpenAPI yaml files (#1094)
Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2020-12-23 18:16:17 -05:00
Marco Ferrari
156024e231
Simplify linter and worker by generalizing ansible-lint (#1035)
Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2020-12-04 16:04:09 -06:00
Lukas Gravley
6f1a131b14
fixing logic for file find (#1049)
* fixing logic

* fix warn error

* fix files

* maybe?

* fix test name

* fix test
2020-12-03 16:17:55 -06:00
Gabriel Diaz
cf0e6a9704
Change log level from warn to debug (#1034)
* Change log level from warn to debug

* Move 'Linting x file' to be printed only if files are found

Co-authored-by: Lukas Gravley <admiralawkbar@github.com>
2020-11-30 11:19:17 -06:00