diff.groovy: NullPointerException
rnveach opened this issue · comments
PS M:\checkstyleWorkspaceEclipse\contribution\checkstyle-tester> groovy .\diff.groovy
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.codehaus.groovy.reflection.CachedClass (file:/C:/RickysPrograms/groovy-2.5.18/lib/groovy-2.5.18.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
error: Missing required options: r, p, l
usage: groovy diff.groovy [options]
options:
-b,--baseBranch <branch_name> Base branch name. Default is master (optional, default is master)
-bc,--baseConfig <path> Path to the base checkstyle config file (optional, if absent then the tool will
use only patchBranch in case the tool mode is 'single', otherwise baseBranch
will be set to 'master')
-c,--config <path> Path to the checkstyle config file (required if baseConfig and patchConfig are
not secified)
-g,--allowExcludes Whether to allow excludes specified in the list of projects (optional, default
is false)
-l,--listOfProjects <path> Path to file which contains projects to test on (required)
-m,--mode <mode> The mode of the tool: 'diff' or 'single'. (optional, default is 'diff')
-p,--patchBranch <branch_name> Name of the patch branch in local git repository (required)
-pc,--patchConfig <path> Path to the patch checkstyle config file (required if baseConfig is specified)
-r,--localGitRepo <path> Path to local git repository (required)
-s,--shortFilePaths Whether to save report file paths as a shorter version to prevent long paths.
(optional, default is false)
-xm,--extraMvnRegressionOptions <arg> Extra arguments to pass to Mavenfor Checkstyle Regression run (optional, ex:
-Dmaven.prop=true)
Caught: java.lang.NullPointerException: Cannot get property 'baseConfig' on null object
java.lang.NullPointerException: Cannot get property 'baseConfig' on null object
at diff.areValidCliOptions(diff.groovy:83)
at diff$areValidCliOptions$0.callCurrent(Unknown Source)
at diff.run(diff.groovy:10)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Fix is merged