Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ktlint descriptor to support list_of_files and better error counting #3575

Merged
merged 1 commit into from
May 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- `API_SPECTRAL` was added as replacement for `OPENAPI_SPECTRAL` (deprecated), supporting AsyncAPI and OpenAPI by default. Uses Spectral's standard config file name `.spectral.yaml` instead of `.openapirc.yml` with a default config with rulesets for AsyncAPI and OpenAPI enabled. Fixes [#3387](https://github.com/oxsecurity/megalinter/issues/3387)
- Disable SQL_TSQLLINT until security issues are solved. Related to <https://github.com/tsqllint/tsqllint/issues/333>
- PHP linters (PHP_PHPCS, PHP_PHPLINT, PHP_PHPSTAN) add support to SARIF report output format with help of <https://github.com/llaville/sarif-php-sdk>
- `KOTLIN_KTLINT` now supports `list_of_files` mode, and has better error counting

- Reporters

Expand Down
3 changes: 3 additions & 0 deletions megalinter/descriptors/kotlin.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ linters:
linter_banner_image_url: https://miro.medium.com/max/655/1*sLboL6JnC9yUodFsdSMB-w.png
linter_megalinter_ref_url: https://github.com/pinterest/ktlint#-with-continuous-integration
cli_lint_fix_arg_name: "--format"
cli_lint_mode: list_of_files
cli_lint_errors_count: regex_sum
cli_lint_errors_regex: '\s+[\w\-_]+:[\w\-_]+: ([0-9]+)'
cli_sarif_args:
- --reporter=sarif,output={{SARIF_OUTPUT_FILE}}
examples:
Expand Down