Commit graph

130 commits

Author SHA1 Message Date
Marco Ferrari
7150e1f8b0
Group log output on GitHub Actions (#4961) 2023-12-12 20:57:15 +01:00
Marco Ferrari
7a21f934b4
Don't forcefully validate Git repos if not needed (#4953)
* Fix find when linting non-git repos

* Remove uses

* Move safe.directory config after we set GITHUB_WORKSPACE

* Fix Git validation check

* Move 'find' test runner to makefile

* Validate vars before validating Git repo

* Validate Git repo even when VALIDATE_ALL_CODEBASE=false

* Initialize GITHUB_SHA when running locally

* Initialize safe git dirs

* Check git safe dirs error code

* Fix log level color marker

* Fix linting errors

* Fix change dir command

* Fix linting errors

* Set default branch
2023-12-07 19:07:22 +00:00
Marco Ferrari
eb688a090c
Change directory when checking ignored files (#4933)
* Change dir when checking ignored files

* Set to GITHUB_WORKSPACE
2023-12-06 07:32:46 +00:00
Marco Ferrari
879672e936
Don't write colors and logs on disk if not necessary (#4934)
* Don't write colors and logs on disk if not necessary

* Set color markers

* Fix colors

* Fix linting errors

* Fix linting errors

* Use sudo to access logs
2023-12-05 08:04:13 +00:00
Marco Ferrari
5a8805dc4f
Exit on errors when running Git (#4889)
* Exit on errors when running Git

* Skip pulling changes entirely

* Enable pipefail when generating diffs

* Cleanup

* Shallow repo check

* Echo GITHUB_SHA update

* Check if GITHUB_SHA exists before using it

* Move GITHUB_SHA validation to validation script

* Rely on cat-file return code

* Check if DEFAULT_BRANCH exists

* Change dir when checking DEFAULT_BRANCH

* Show git branches

* Don't switch branches

* Check GITHUB_SHA only when needed

* Ensure we have permissions before interacting with the repo

* Remove the DIFF_CMD variable

* Move TEST_CASE_RUN and RUN_LOCAL init up

* Validate if Git repo and if SHA exists

* Move validation function

* Change dir when getting branch names

* Move debug messages up to be less verbose

* Move branch validation in a function

* Fix linting errors
2023-12-04 09:47:49 +00:00
Marco Ferrari
a8150b40c8
Fix ts-standard configuration (#4932)
* Fix ts-standard configuration

* Fix default TYPESCRIPT_STANDARD_TSCONFIG_FILE assignment
2023-12-02 08:35:41 +00:00
Chris McIntosh
6c7dc51cf8
Fixes Regex to match only container files more strictly (#4867)
* #4846 fixes regex to be more strict with filenames that container Dockerfile but that are not actually dockerfiles

* Debug print for ANSIBLE_DIRECTORY to see if tests exist

* Trying out the =~ operator

* rm echo cmd

* catch the i-am-containerfile case

* rm extra space

* Remove quotes for shell format linter

---------

Co-authored-by: Zack Koppert <zkoppert@github.com>
2023-11-15 05:44:46 +00:00
Zack Koppert
35c3fa445c
update GitHub SSH fingerprints (#4826) 2023-11-01 12:09:09 -07:00
Kin Fai Tse
c3ac3aa5d9
Batched & parallel support for cfn-lint, eslint, gitleaks (#4088)
* faster linter for cfn-lint and eslint

* workaround shfmt error

* fix xargs interleave large outputs

* parallel gitleaks

* fix exec bit, shfmt, bash linter

* show parallel --citation

* refactor a common interface using named pipe

* add readme for the experimental impl

* fix readme format

* minimize change in worker.sh

* will cite, showed once

* remove junk comment

* explicitly set EXPERIMENTAL_BATCH_WORKER=false

* fix: errors from github/super-linter:v5
2023-10-31 00:13:33 +00:00
cicdguy
94279fc4ed
No fatal error on R package installation (#4705)
Co-authored-by: Zack Koppert <zkoppert@github.com>
2023-10-15 05:10:37 +00:00
Masaya Suzuki
50d462e0ec
renovate-config-validator: validate shareable config preset (#4674)
* renovate-config-validator: validate default.json

* Add RENOVATE_SHAREABLE_CONFIG_PRESET_FILE

* Allow specifying multiple additional files with a environment variable

* Add break
2023-09-29 20:25:37 +00:00
Masaya Suzuki
3703f392e8
Add renovate-config-validator (#4643) 2023-09-12 16:58:09 +00:00
Zack Koppert
da4dd08cd6
Follow up with several more documentation and automation renames for the org move from github to super-linter (#4543)
* move from github org to super-linter org

* rename to super-linter org

* rename to super-linter org

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter and remove dockerhub reference

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rename org to super-linter

* rm dockerhub section link
2023-08-17 15:12:11 +00:00
Jan Hentschel
ec17c93135
Handle tflint deprecations (#4451)
Solve the deprecations introduced in tflint, which are getting removed
in v0.47.0.

Co-authored-by: Philip Mallegol-Hansen <philip@mallegolhansen.com>
2023-07-09 09:56:47 -07:00
Stephen Abbene
35d5a3e9fb
Running superlinter as a user not defined in /etc/passwd causes error messages (#4351)
* no need to run git check-ignore on every file if you are not setting IGNORE_GITIGNORED_FILES

* use id instead of whoami for determining running and discard stderr

* accidently include change from other PR

* remove commented code

---------

Co-authored-by: Zack Koppert <zkoppert@github.com>
2023-06-20 19:57:38 +00:00
EJ Etherington
dea6e50722
Update Kuberentes File Detection (#4375)
Co-authored-by: Zack Koppert <zkoppert@github.com>
2023-06-20 12:27:03 -07:00
Stephen Abbene
6c1fcb284a
no need to run git check-ignore on every file if you are not setting IGNORE_GITIGNORED_FILES (#4348) 2023-06-09 09:33:05 -07:00
Bert Roos
ef76367358
Issue hint when failing to switch back to branch (#4107)
* Issue hint when failing to switch back to branch

Switching back to the branch fails with the below error on a shallow checkout:

2023-04-18 21:34:51 [ERROR]   Failed to switch back to branch!
2023-04-18 21:34:51 [FATAL]   [fatal: reference is not a tree: 3afa21b5f9bef8e81396e3572a598d089e710b96]

With this change, it will look as follows:

2023-04-18 21:34:51 [ERROR]   Failed to switch back to branch!
2023-04-18 21:34:51 [INFO]   Check that you have the full git history, the checkout is not shallow, etc
2023-04-18 21:34:51 [INFO]  See https://github.com/github/super-linter#example-connecting-github-action-workflow
2023-04-18 21:34:51 [FATAL]   [fatal: reference is not a tree: 3afa21b5f9bef8e81396e3572a598d089e710b96]

* Update lib/functions/buildFileList.sh

---------

Co-authored-by: Philip Mallegol-Hansen <philip@mallegolhansen.com>
2023-05-23 00:30:16 +00:00
Chris Kuhl
6bde96b30c
fix: Correct typo in env. var. name (#4153) 2023-05-22 23:08:35 +00:00
Janis Voigtländer
92ee250684 Textlint should check every file 2023-04-16 22:08:23 -04:00
tonyk7440
516b3f81b1 #3501 edit code to debug from review 2023-04-10 19:29:18 -04:00
Tony Kenny
e8d8e662c8 #3473 redirect more output 2023-04-10 19:29:18 -04:00
tonyk7440
c525f0b39f #3473 try alternate install cmd 2023-04-10 19:29:18 -04:00
Brett Logan
c681b09ebe Specify version flag for kubeconform
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-16 21:14:13 -05:00
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
Jon Hamm
aad87c569b add jenkinsfile to groovy files 2023-01-05 09:52:29 -05:00
Algin Maduro
9f4a208eb5 Add terraform fmt support 2023-01-04 22:44:16 -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
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
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
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