feat(lint): add npm-groovy-lint support for Groovy files#761
Open
TimotheusBachinger wants to merge 2 commits into
Open
feat(lint): add npm-groovy-lint support for Groovy files#761TimotheusBachinger wants to merge 2 commits into
TimotheusBachinger wants to merge 2 commits into
Conversation
Demo for using the linter for groovy: ``` $ bazel run //tools/lint:groovy-lint -- `pwd`/src 130 ↵ INFO: Analyzed target //tools/lint:groovy-lint (0 packages loaded, 0 targets configured). INFO: Found 1 target... Target //tools/lint:groovy-lint up-to-date: bazel-bin/tools/lint/groovy-lint_/groovy-lint INFO: Elapsed time: 0.080s, Critical Path: 0.00s INFO: 1 process: 1 internal. INFO: Build completed successfully, 1 total action INFO: Running command line: bazel-bin/tools/lint/groovy-lint_/groovy-lint <args omitted> /home/timotheus/git_external/rules_lint/examples/groovy/src/has_errors.groovy 6 error The [org.jenkinsci.plugins.pipeline.modeldefinition.Utils] import is never referenced UnusedImport 16 error The variable [unusedVar] in class HasErrors is not used UnusedVariable npm-groovy-lint results in 2 linted files: ┌─────────┬───────────┬─────────────┐ │ (index) │ Severity │ Total found │ ├─────────┼───────────┼─────────────┤ │ 0 │ 'Error' │ 2 │ │ 1 │ 'Warning' │ 0 │ │ 2 │ 'Info' │ 0 │ └─────────┴───────────┴─────────────┘ Failure: 2 error(s) have been found 0 warning(s) have been found 0 info(s) have been found ```
Add a new linter aspect for Groovy files using npm-groovy-lint. Features: - Supports both lint and fix modes - Human-readable output (txt format) for console - Machine-readable output (SARIF format) for CI integration - Works with filegroups tagged with "groovy" or "lint-with-groovy" - Integrates with rules_js for npm package management
|
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

feat(lint): add npm-groovy-lint support for Groovy files
Add a new linter aspect for Groovy files using npm-groovy-lint.
Features: