nvuillam/npm-groovy-lint

o.c.r.PropertiesFileRuleSetConfigurer -- RuleSet configuration properties file [codenarc.properties] not found.

harishjangam6979 opened this issue · 6 comments

I've recently upgraded my npm-lint version from 9 to 13. However, i'm facing the below issue when running the npm-groovy-lint command.

+ npm-groovy-lint --noserver
GroovyLint: Error running CodeNarc: 
22:57:47.254 [main] INFO  o.c.r.PropertiesFileRuleRegistry -- Loaded properties file in 300ms; 397 rules
22:57:59.960 [main] INFO  o.c.r.PropertiesFileRuleSetConfigurer -- RuleSet configuration properties file [codenarc.properties] not found.

My .groovylintrc.json is below

{
  "extends": "all",
  "rules": {
    "basic.DeadCode": "error",
    "convention.CompileStatic": {
      "severity": "info"
    },
    "convention.FieldTypeRequired": "info",
    "convention.IfStatementCouldBeTernary": "info",
    "convention.NoDef": "info",
    "convention.TrailingComma": "off",
    "convention.VariableTypeRequired": "info",
    "dry.DuplicateListLiteral": "info",
    "dry.DuplicateMapLiteral": "warning",
    "dry.DuplicateNumberLiteral": {
      "ignoreNumbers": [0, 1, 2, 3, -1],
      "severity": "info"
    },
    "dry.DuplicateStringLiteral": "info",
    "exceptions.ThrowException": "info",
    "exceptions.ThrowNullPointerException": "info",
    "exceptions.ThrowRuntimeException": "info",
    "exceptions.ThrowThrowable": "info",
    "formatting.BracesForClass": "info",
    "formatting.BracesForForLoop": "info",
    "formatting.BracesForIfElse": "info",
    "formatting.BracesForMethod": "info",
    "formatting.BracesForTryCatchFinally": "info",
    "formatting.Indentation": {
      "spacesPerIndentLevel": 4,
      "severity": "info"
    },
    "formatting.SpaceAroundMapEntryColon": "off",
    "groovyism.ExplicitCallToEqualsMethod": "info",
    "logging.Println": "off",
    "unused.UnusedArray": "error",
    "unused.UnusedObject": "error",
    "unused.UnusedPrivateField": "error",
    "unused.UnusedPrivateMethod": "error",
    "unused.UnusedPrivateMethodParameter": "error",
    "unused.UnusedVariable": "error",
    "unnecessary.UnnecessaryReturnKeyword": "off"
  }
}

I tried adding codenarc.properties file with ruleset=org.codenarc.ruleset.AllRules as data in it. Still the issue persist.

  • node -v
    v18.18.2

@nvuillam - Any thoughts here ??

Latest logs:

  • ls -lart
    total 28
    drwxr-xr-x 4 1000 1000 112 Dec 18 07:08 ..
    drwxr-xr-x 2 1000 1000 4096 Dec 18 07:08 vars
    drwxr-xr-x 3 1000 1000 17 Dec 18 07:08 src
    drwxr-xr-x 7 1000 1000 135 Dec 18 07:08 resources
    -rwxr-xr-x 1 1000 1000 57 Dec 18 07:08 codenarc.properties
    -rw-r--r-- 1 1000 1000 163 Dec 18 07:08 Jenkinsfile_external
    -rw-r--r-- 1 1000 1000 1192 Dec 18 07:08 .groovylintrc.json
    -rw-r--r-- 1 1000 1000 166 Dec 18 07:08 .gitignore
    drwxr-xr-x 6 1000 1000 185 Dec 18 07:08 .
    drwxr-xr-x 8 1000 1000 162 Dec 18 07:08 .git

  • node -v
    v18.18.2
    [Pipeline] sh

  • npm-groovy-lint --noserver --version
    GroovyLint: Unable to start CodeNarc Server. Use --noserver if you do not even want to try
    GroovyLint: Successfully processed CodeNarc:
    CodeNarc version 3.3.0

npm-groovy-lint version 13.0.2

Embeds:
CodeNarc version 3.3.0

  • Groovy version 3.0.9 (superlite)
    [Pipeline] sh
  • npm-groovy-lint --noserver --no-insight -o ./results.json --verbose
    GroovyLint: Error running CodeNarc:
    07:09:58.418 [main] INFO o.c.r.PropertiesFileRuleRegistry -- Loaded properties file in 298ms; 397 rules
    07:10:12.418 [main] INFO o.c.r.PropertiesFileRuleSetConfigurer -- RuleSet configuration properties file [codenarc.properties] not found.

I don't think that's anything to worry about, previously this could well have been hidden but with the new logging setup you'll see INFO and above both npm-groovy-lint and CodeNarc.

Are you seeing any adverse effects?

It is failing the job when the error is thrown : 22:46:56.421 [main] INFO o.c.r.PropertiesFileRuleSetConfigurer -- RuleSet configuration properties file [codenarc.properties] not found.

It worked after updating the version. I think i also have to add --failon as default.

Great, thanks for the feedback :)