Commit graph

59 commits

Author SHA1 Message Date
Marco Ferrari
c26430f868
feat: support arbitrary shellcheck config paths (#5571)
- Support passing an arbitrary path to the shellcheck configuration file
  with the BASH_CONFIG_FILE_NAME variable. This brings shellcheck in
  line with other linters that support configuration files.
- Enable shellcheck external sources using a directive in the
  configuration file, so users can eventually override it if not needed.
- Export command configuration variables that subprocesses might need.

Close #5414
2024-04-25 19:47:55 +00:00
Masaya Suzuki
69249882f3
feat: support GoReleaser (#5505) 2024-04-15 12:38:25 +00:00
Ümit Büyükulcay
0ae4572874
feat: add clang-format style configuration (#5424) 2024-04-11 14:59:47 +02:00
Junya Okabe
e71a37d49d
feat: add depndency (#5456)
feat: configure ruff

feat: update the orchestration scripts

feat: update the test suite

docs: update README

feat: add test cases for ruff

fix: CI error

chore: del .github/linters/.ruff.toml

fix: CI error

fix: README

update: LINTER_NAMES_ARRAY

fix: Dockerfile

fix: .github/linters/.jscpd.json

fix: test files

fix: del version_command
2024-04-10 12:02:28 +00:00
Chongyi Zheng
252a980961
build: add glibc via gcompat layer (#5334) 2024-02-29 17:12:01 +00:00
Marco Ferrari
49320c834b
build: install dotnet and powershell from images (#5245)
Install the .NET SDK and PowerShell from their container images so that
we avoid spending time running their installers, and we can control
their updates automatically.

Close #5243
2024-02-10 08:51:09 +00:00
Marco Ferrari
5b5e54ad5c
fix: initialize terrascan at runtime (#5246)
Terrascan runs initialization anyway when scanning files, so there's no
point in running it at build time. Also, this works around a Terrascan
bug that caused it to fail its initialization if $HOME/.terrascan
directory is not present. This happens on GitHub Actions because it
configures a $HOME directory that is different from ours.
2024-02-09 22:57:01 +00:00
Marco Ferrari
83eca1df43
fix: unset the log_level variable (#5249)
- Super-linter uses the LOG_LEVEL variable to let the user
  configure the desired log level. Checkov and Renovate use a variable
  with the same name for the same purpose, but accept a
  different set of values, and exit with an error if it gets an unknown
  value for that variable.
- Refactor the VERBOSE log level to the more commonly used INFO.
  Configuration validation will warn users if they use VERBOSE and
  instruct them to use INFO instead. This is not a breaking change
  because super-linter falls back on INFO if VERBOSE is set.
- Remove the TRACE log level because we rarely used it. As with VERBOSE,
  configuration validation will warn the user. Fall back to DEBUG if the
  user configured LOG_LEVEL to VERBOSE.

Close #5217
2024-02-09 18:43:58 +00:00
Marco Ferrari
d7790e4f1c
build: move linter verions logic outside runtime (#5197)
Move the logic to build the linter versions file outside the main
runtime. There's no need to include it there because it's used only when
building the image.

Move the list of linters by name in linterVersions.sh because we don't
need it in any other place.
2024-02-05 13:31:36 +01:00
Marco Ferrari
eded42747b
fix: don't add unnecessary empty lines (#5221) 2024-02-05 11:49:22 +01:00
Marco Ferrari
99e41ce451
feat: run linters in parallel (#5177) 2024-01-30 19:24:55 +00:00
Marco Ferrari
e162b950f4
build: update tekton-lint to use its new namespace (#5176)
tekton-lint is now published under the @ibm namespace
2024-01-24 07:14:55 +00:00
Marco Ferrari
f3d1590cd4
build: update react native dependencies (#5152)
- Update @react-native-community dependencies to their @react-native
  upgrades because the former namespace is deprecated (React release
  0.72)
- Don't install @react-native/eslint-plugin directly because it's a
  dependency of @react-native/eslint-config
2024-01-18 17:39:35 +00:00
Marco Ferrari
df911171c4
build: python venvs and npm in dedicated stages (#5078)
Move the following tasks to dedicated stages so we can run these steps
in parallel with other stages:

- Build Python virtual environments
- Install npm packages
- Build clang-format
- Download and install TFlint plugins

Add missing target stage when building the container image
2024-01-10 11:09:53 +01:00
Marco Ferrari
cf2038d903
fix: fix GITHUB_BEFORE_SHA initalization for push (#5098) 2024-01-05 23:07:39 +01:00
Marco Ferrari
3847309eca
build: remove unneeded Node dependencies (#5093)
- Remove axios, immer, ini, lodash, node-fetch that were installed to
  run Trivy reports. We can remove them because we use the Trivy action.
- Remove the Trivy workflow that was disabled anyway.
2024-01-03 16:54:06 +01:00
Marco Ferrari
65aae17a26
build!: uninstall eslint-config-airbnb-typescript (#5077)
eslint-config-airbnb-typescript is unmaintained. Having it installed is
blocking @typescript-eslint/eslint-plugin updates
2024-01-03 10:45:39 +01:00
Marco Ferrari
9257ba8af3
build: use embedded checkstyle configuration files (#5089)
checkstyle embeds sun_checks.xml and google_checks.xml so we can use
them instead of shipping our own.
2024-01-02 18:47:45 +01:00
Marco Ferrari
901a901655
fix: add missing checkov configuration file (#5090)
Add a default (empty) configuration file for Checkov and a smoke test to
ensure that we catch the case where a default configuration file is not
present, and it should be.
2024-01-02 18:03:30 +01:00
Marco Ferrari
19e39e211e
build: install clang-format from OS package repo (#5071)
Build and install clang-format instead of pulling it from a (potentially)
unmaintained repository
2024-01-01 11:39:59 +01:00
Marco Ferrari
1ca3ebccd6
build: reduce container image size (#5072)
- Remove build-time dependencies
- Remove cached NPM packages
- Remove cached PyPi packages
- Remove dependency descriptors. These still count against the total space,
  although it's a few KBs
- Install rust-clippy and rust-fmt using the OS package manager instead of
  maintaining our own installation script
- Add tests for build time dependencies that are not supposed to be installed
2023-12-29 19:30:58 +01:00
Marco Ferrari
4d9eaa5c54
build: update Dart, dart analyzer to 3.2.4 (#5065)
Recent versions of dart analyzer don't support the --options
configuration option anymore, so we cannot pass an arbitrary
configuration file. This commit removes the default dart analyzer
configuration file as well, because it's not needed anymore.
2023-12-26 22:14:57 +01:00
Marco Ferrari
9d7268fb99
feat: add support for checkov to lint iac files (#4925)
- Add support to run Checkov against infrastructure as code descriptors
  that are in a given (configurable) directory. Defaults to lint the
  whole workspace.
- Establish a baseline for our own codebase so we don't have to fix
  issues right away with this change.
2023-12-22 13:22:15 +01:00
Marco Ferrari
60983d395f
fix: fail if r package installation fails (#4994)
- Fail if the installation of a R package fails.
- Install the remotes package once during the image build, and not when we scan
  files at runtime.
- Reuse the default R library directory instead of moving it to /home/r-library
2023-12-21 20:52:57 +01:00
Marco Ferrari
22b8624f61
Simplify container image build (#4962) 2023-12-15 11:59:36 +01:00
Marco Ferrari
d465382ed5
Update documentation (#4981)
* Update documentation

* Fix typos

* Update security policy

* Remove outdated instructions

* Fix list

* Add more info to config load step

* Don't test linter.yml

* Point to the cd workflow in README

* Move badge up

* Add info about Make help

---------

Co-authored-by: Zack Koppert <zkoppert@github.com>
2023-12-11 21:35:20 +00:00
Marco Ferrari
b11b2ff58d
Update spectral dependency id (#4896)
* Update spectral dependency id

* Update test
2023-11-30 08:20:04 +00:00
Zack Koppert
071f051633
Update google java format and JDK (#4848)
* Update google java format and JDK

* update to use non-deprecated function

* update jdk to v18

* update to jdk v18

* try v17 jdk

* try v17 jdk
2023-11-10 22:46:25 -08:00
dependabot[bot]
d9800fbdac
Bump asl-validator from 3.6.1 to 3.8.1 in /dependencies (#4598)
* Bump asl-validator from 3.6.1 to 3.8.1 in /dependencies

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

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

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

* asl-validator now supports a `--version` command 🎉

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Zack Koppert <zkoppert@github.com>
2023-10-25 22:29:52 +00:00
Frode Danielsen
650b6aec03
Add Babel preset for TypeScript package (#4762)
This preset is recommended for those who use TypeScript, adding support
for transforming TypeScript to JavaScript through Babel.
2023-10-17 16:16:52 +00:00
Vadim Hatsura
80476af4f7
feat: use built-in dotnet format linter for csharp language (#4627)
* chore: add test case for csharp language which should pass

it shows that the current version of linter for csharp language reports false positive issues

* feat: use built-in linter for csharp language

https://github.com/dotnet/format/issues/1268

* chore: remove dotnet-format installation from install-dotnet.sh

dotnet format is a part of .NET 6 SDK and shouldn't be installed separately anymore

* docs: update linter name for dotnet

instead of dotnet-format built-in format command from dotnet is used (points to the same repository as before)

* chore: update linter name for dotnet in tests

---------

Co-authored-by: Zack Koppert <zkoppert@github.com>
2023-10-16 18:31:03 +00:00
Frode Danielsen
f80306778f
Add Babel preset for React package (#4653)
The React preset for Babel is useful for automatically adding Babel
plugins to understand JSX syntax.
2023-09-19 19:13:50 +00:00
Brett Logan
c2460a245f
Update ansible-lint regex
Signed-off-by: Brett Logan <lindluni@github.com>
2023-04-16 23:32:42 -04:00
Brett Logan
05f34c653f Add kubeconform version flag
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
Brett Logan
58a5e5c4b0 Fix inspec test linter_name for terraform fmt
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-11 12:29:36 -05:00
Brett Logan
6cc86ad030 Add missing comma
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-11 12:29:36 -05:00
Brett Logan
ada457273e Add terraform_fmt to inspec tests
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-11 12:29:36 -05:00
Brett Logan
c26ca9fb2c Address linting issues
Signed-off-by: Brett Logan <lindluni@github.com>
2023-01-09 11:36:04 -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
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
Barry Pollard
19abf45423
Correct SQLFluff config filename (#2366) 2022-01-24 09:01:37 -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
Brett Logan
fc6c5b34d9
Use Virtual Environment for Python Deps (#2294)
* Build static python depenencies

* Address linting

* Fix copy path

* cleaner

* Stage virtual environments

* Update Dockerfile to support virtual environments

* Remove old python builds

* Remove unnecessary RUN step

* Fix merge conflicts

* Remove test checking for PIP packages

We use virtual environments and no longer install the packages
via pip directly in the image. It should be enough that the version
tests check for the existence already and that the version
comes back correctly.

* Remove binary installation of black

* cleaner

* Remove pip

* pretty

Co-authored-by: Admiral Awkbar <admiralawkbar@github.com>
2022-01-10 15:23:22 -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
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
Lukas Gravley
81422f3c47
update clang-format (#2007)
* update code

* fixed

* its the v

* hide cache

* it was an org setting lol

* remove from slim

* bump test
2021-09-29 13:12:40 -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
Lukas Gravley
148622b273
Sqlfluff (#1834)
* adding sqlfluff

* adding sqlfluff

* update test

* adding sql file array
2021-08-05 15:32:27 -05:00