Commit graph

94 commits

Author SHA1 Message Date
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
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
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
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
Ross Smith II
ef8f202ea2
fix: Output gitleaks version (#2363) 2022-01-20 14:06:10 -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
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
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
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
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
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
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
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
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