Skip to content

Migrate Codenarc from currently compatible version v2.2.0 to latest release #14680

@MANISH-K-07

Description

@MANISH-K-07

Response to #14556 (comment)

Follow-up of Issue #14556 (closed by PR #14558)

We cannot use the latest codenarc release due to older groovy version used in CI and the groovy syntax used in our scripts.
We have settled on v2.2.0 (highest compatible and stable)
For latest release : https://github.com/CodeNarc/CodeNarc/releases/tag/v3.4.0

v3.4.0 Latest (codenarc release notes)

Requirements
CodeNarc requires:
Java 1.8 or later
[Groovy](http://groovy-lang.org/) version 3.0 or later; Groovy version 4.0 or later for the 3.x.x-groovy-4.x versions of CodeNarc
[SLF4J](https://www.slf4j.org/) API and binding jar(s)
[GMetrics](https://dx42.github.io/gmetrics/) or GMetrics-Groovy4 2.1.0 or later, if using the Size/Complexity rules

The requirement of groovy 3 is evident in discussion at CodeNarc/CodeNarc#630 also.

Any version higher than v2.2.0 (presently used) produce the following conflicts :

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/usr/share/groovy/lib/groovy-2.4.21.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.codehaus.groovy.reflection.CachedClass
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.AbstractMethodError: Receiver class org.codenarc.CodeNarc does not define or inherit an implementation of the resolved method 'abstract void setProperty(java.lang.String, java.lang.Object)' of interface groovy.lang.GroovyObject.

The current groovy version that checkstyle uses is 2.4.x stream .
Codenarc we use must be migrated to latest release. This requires groovy migration (min required v3, latest stable version 4.0)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions