You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ mvn codenarc:codenarc
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< ru.mystamps:mystamps >------------------------
[INFO] Building My Stamps 0.3-SNAPSHOT
[INFO] --------------------------------[ war ]---------------------------------
[INFO]
[INFO] --- codenarc-maven-plugin:0.22-1:codenarc (default-cli) @ mystamps ---
[INFO] sourceDirectory is C:\Users\slava\git\mystamps\src\test\groovy
[INFO] sourceDirectory is C:\Users\slava\git\mystamps\src\test\groovy
Downloading from central: https://repo.maven.apache.org/maven2/org/codenarc/CodeNarc/0.27.0/CodeNarc-0.27.0.jar
Downloaded from central: https://repo.maven.apache.org/maven2/org/codenarc/CodeNarc/0.27.0/CodeNarc-0.27.0.jar (4.3 MB at 909 kB/s)
[java] ERROR: Invalid argument format: [Stamps]. Expression: matcher. Values: matcher = java.util.regex.Matcher[pattern=\-(.*)\=(.*) region=0,6 lastmatch=]
[java] java.lang.AssertionError: Invalid argument format: [Stamps]. Expression: matcher. Values: matcher = java.util.regex.Matcher[pattern=\-(.*)\=(.*) region=0,6 lastmatch=]
[java] at org.codehaus.groovy.runtime.InvokerHelper.assertFailed(InvokerHelper.java:401)
[java] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.assertFailed(ScriptBytecodeAdapter.java:655)
[java] at org.codenarc.CodeNarc$_parseArgs_closure3.doCall(CodeNarc.groovy:156)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:498)
[java] at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
[java] at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
[java] at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:272)
[java] at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:906)
[java] at groovy.lang.Closure.call(Closure.java:412)
[java] at groovy.lang.Closure.call(Closure.java:425)
[java] at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1326)
[java] at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:1298)
[java] at org.codehaus.groovy.runtime.dgm$148.invoke(Unknown Source)
[java] CodeNarc - static analysis for Groovy',
[java] Usage: java org.codenarc.CodeNarc [OPTIONS]
[java] where OPTIONS are zero or more command-line options of the form "-NAME[=VALUE]":
[java] -basedir=<DIR>
[java] The base (root) directory for the source code to be analyzed.
[java] Defaults to the current directory (".").
[java] -includes=<PATTERNS>
[java] The comma-separated list of Ant-style file patterns specifying files that must
[java] be included. Defaults to "**/*.groovy".
[java] -excludes=<PATTERNS>
[java] The comma-separated list of Ant-style file patterns specifying files that must
[java] at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:271)
[java] at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:53)
[java] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
[java] be excluded. No files are excluded when omitted.
[java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
[java] -rulesetfiles=<FILENAMES>
[java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
[java] The path to the Groovy or XML RuleSet definition files, relative to the classpath.
[java] This can be a single file path, or multiple paths separated by commas.
[java] Defaults to "rulesets/basic.xml"
[java] -title=<REPORT TITLE>
[java] The title descriptive for this analysis; used in the output report(s). Optional.
[java] -report=<REPORT-TYPE[:FILENAME]>
[java] The definition of the report to produce. The option value is of the form
[java] TYPE[:FILENAME], where TYPE is "html", "text", "xml", or "console" and FILENAME is the filename (with
[java] optional path) of the output report filename. If the report filename is
[java] omitted, the default filename is used for the specified report type
[java] ("CodeNarcReport.html" for "html" and "CodeNarcXmlReport.xml" for "xml"). If no
[java] report option is specified, default to a single "html" report with the
[java] default filename.
[java] -help
[java] at org.codenarc.CodeNarc.parseArgs(CodeNarc.groovy:153)
[java] Display the command-line help. If present, this must be the only command-line parameter.
[java] Example command-line invocations:
[java] java org.codenarc.CodeNarc
[java] at org.codenarc.CodeNarc.execute(CodeNarc.groovy:122)
[java] java org.codenarc.CodeNarc -rulesetfiles="rulesets/basic.xml" title="My Project"
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] java org.codenarc.CodeNarc -report=xml:MyXmlReport.xml -report=html
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[java] java org.codenarc.CodeNarc -help'
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.lang.reflect.Method.invoke(Method.java:498)
[java] at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:272)
[java] at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:64)
[java] at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
[java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
[java] at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
[java] at org.codenarc.CodeNarc.main(CodeNarc.groovy:111)
[java] Java Result: 1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 15.981 s
[INFO] Finished at: 2018-12-28T11:26:18Z
[INFO] ------------------------------------------------------------------------
$ pwd
/c/Users/slava/git/mystamps
The text was updated successfully, but these errors were encountered:
I just had a similar issue to this using codenarc on windows, check that any files you pass as arguments don't have spaces in the path (do you have a file that ends in Stamps by chance?).
@jameswilliams1 Thank for the comment! As I don't use Windows and this is an old issue (3+ years), I don't care about it anymore and I hope that one day I will get rid of CodeNarc/Spock/Groovy from my project :)
The text was updated successfully, but these errors were encountered: