Repository navigation
Lint: rule packs can declare overrides; SARIF rule descriptions no longer come from transform names - #9524
Open
bamaer wants to merge 1 commit into
Open
Lint: rule packs can declare overrides; SARIF rule descriptions no longer come from transform names#9524bamaer wants to merge 1 commit into
bamaer wants to merge 1 commit into
Conversation
…nger come from transform names, addresses apache#9500
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.
Addresses #9500, parts 2 and 3.
AbstractYamlRulePacknow implementsgetOverrides()from theoverrides:in its YAML pack block, read the same way as its rules (classpath first, then beside the plugin jar). A rule pack shipped as a Java plugin can now replace a core rule, as a file-based pack already could.shortDescriptionis the name of the native rule that classified it, or the rule id. It is no longer the name of whichever transform or action reported it first.Tests:
RuleRegistryTest(a classpath pack overridingDB-001; a pack without overrides declares none) andLintReportWriterTest(two transforms reportingCONNECTION_NOT_ASSIGNED; a remark classified byHOP-CHECK). The lint module's 485 tests pass and spotless is clean.