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

codeNarcRulesets not detected when used within .groovylintrc.json #156

Open
MichelleKyne opened this issue Jun 7, 2022 · 3 comments
Open

Comments

@MichelleKyne
Copy link

I am using the extension with vscode and I have updated the contents of .groovylintrc.json with the examples rule sets provided.

{
"codenarcRulesets": "RuleSet-1.groovy,RuleSet-2.groovy"
}

No problems are detected within the Jenkins file when I analyze the code following the modification of the config file.

Ideally I would like to implement only those rules in "rulesets/formatting.xml".

$ groovy --version
Groovy Version: 4.0.2 JVM: 18.0.1.1 Vendor: Oracle Corporation OS: Windows 10

$ java -version
java version "18.0.1.1" 2022-04-22
Java(TM) SE Runtime Environment (build 18.0.1.1+2-6)
Java HotSpot(TM) 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)

@nvuillam
Copy link
Owner

What if you run npm-groovy-lint at the root of your repository ?

@MichelleKyne
Copy link
Author

When I run npm-groovy-lint on the JenkinsFile I want to analyze (without the presence of the .groovylintrc.json file) no errors are detected. There are 36 problems detected by the vscode extension though.

Copy link

This issue has been automatically marked as stale because it has not had recent activity.
It will be closed in 14 days if no further activity occurs.
Thank you for your contributions.

If you think this issue should stay open, please remove the O: stale 🤖 label or comment on the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants