This repository was archived by the owner on Mar 10, 2025. It is now read-only.
Update codenarcVersion to v3 (major) #120
Merged
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.
This PR contains the following updates:
1.6.1->3.3.01.6.1->3.3.0Release Notes
CodeNarc/CodeNarc (codenarc)
v3.3.0New Rules
Updated/Enhanced Rules and Bug Fixes
-sourcefilesargument to use thebasedirparameter (if specified), and work with paths relative to the current directory. ChangedFilesSourceAnalyzerto defaultbaseDirectoryto ‘.’ rather thanSystem.getProperty('user.dir').Documentation
v3.2.0Updated/Enhanced Rules and Bug Fixes
Build, Infrastructure and Tests
sourcefiles(Nicolas Vuillamy)Documentation
v3.1.0Updated/Enhanced Rules and Bug Fixes
Build, Infrastructure and Tests
v3.0.1Updated/Enhanced Rules and Bug Fixes
Build, Infrastructure and Tests
v3.0.0Updated/Enhanced Rules and Bug Fixes
collect()call returns a different type.Assertions.assertEquals().Build and Infrastructure
AstUtil: SimplifyfindFirstNonAnnotationLine()last annotation logic and check for “class” within the line if it is a ClassNode. SimplifygetAnnotation().v2.2.0Updated/Enhanced Rules and Bug Fixes
dev()method calls if argument is a Map, Closure or String.Build and Infrastructure
AbstractAstVisitor: AddisGeneratedCode(ASTNode)andisNotGeneratedCode(ASTNode).Documentation
v2.1.0New Rules
Updated/Enhanced Rules and Bug Fixes
@Fieldannotation.Build and Infrastructure
-propertiescommand-line argument to specify name/location for "codenarc.properties" file.AbstractRuleTestCase: Provide aliases forassertViolationsMap keys: lineNumber = line, sourceLineText = source, messageText = message.Documentation
v2.0.0New Rules
Optional<List>(orCollection,ArrayList,Set,Map,HashMap, etc.). Return an empty collection instead.Updated/Enhanced Rules and Bug Fixes
finalvariables the same as regular variables (i.e. not like constants). See VariableName Note [BREAKING CHANGE]excludeRegexno longer requires (or expects) a method name to include '()'. [BREAKING CHANGE]xx.toString()added (+) to a String constant; add check for GString expression${xxx.toString()}. [BREAKING CHANGE]URLClassLoader.CodeNarc Plugin Mechanism
CodeNarcPluginCodeNarcTask) and-pluginsparameter to the command-line.CodeNarcRunner: Apply plugins for rules, violations and reports. Register any plugin classes specified by the "org.codenarc.plugins" system property.sourceCodeproperty toFileResults; set it fromFilesystemSourceAnalyzerandAntFileSetSourceAnalyzer.BaselineResultsProcessorto a plugin:BaselineResultsPlugin. SwitchCodeNarcTaskto use plugin. RemoveResultsProcessorclasses.Disabling Rules From Comments
codenarc-disablein a comment; optionally re-enable by specifyingcodenarc-enableon a subsequent line. Disable rules for the current line withcodenarc-disable-line.RuleSets
Framework and Infrastructure
gh-pagesbranch.Documentation
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by Mend Renovate. View repository job log here.