Code Monkey home page Code Monkey logo

spotbugs-cli's Introduction

Experimental spotbugs-cli

Codacy Badge Build Gitpod ready-to-code

An experimental CLI for SpotBugs based on picocli. It is expected to solve two problems:

  1. Make command line arguments and options following the Command Line Interface Guidelines.
  2. Build native binaries with Picocli on GraalVM.

How to run the native image

export JAVA_HOME=path/to/graalvm-22.0.0.2
export JAVA8_HOME=path/to/jdk8
./gradlew nativeImage
build/executable/spotbugs \
  -Djava.home=$JAVA8_HOME \
  --aux $JAVA8_HOME/jre/lib/rt.jar \
  build/libs/spotbugs-cli-1.0.0-SNAPSHOT.jar

WIP: Command line option and argument

--help
--version
--include spotbugs-include.xml
--exclude spotbugs-exclude.xml
--baseline spotbugs-baseline.xml
--xml build/reports/spotbugs/main.xml
--html build/reports/spotbugs/main.html
--sarif build/reports/spotbugs/main.sarif
--xdocs build/reports/spotbugs/main.xdocs
--emacs build/reports/spotbugs/main.emacs
--detector OverridingMethodsMustInvokeSuperDetector
--aux path/to/dependencies/*.jar
build/libs/target-to-analyse.jar

Copyright

Copyright © 2020-2022 Kengo TODA

spotbugs-cli's People

Contributors

codacy-badger avatar dependabot[bot] avatar kengotoda avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

spotbugs-cli's Issues

Could not initialize class edu.umd.cs.findbugs.ba.AnalysisContext

$ build/executable/spotbugs --aux /Users/kengo/Downloads/graalvm-ce-java11-21.1.0/Contents/Home/lib/jrt-fs.jar build/libs/spotbugs-cli-1.0.0-SNAPSHOT.jar
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class edu.umd.cs.findbugs.ba.AnalysisContext
        at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:239)
        at edu.umd.cs.findbugs.FindBugs2.clearCaches(FindBugs2.java:348)
        at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:327)
        at jp.skypencil.spotbugs.cli.App.call(App.kt:82)
        at jp.skypencil.spotbugs.cli.App.call(App.kt:34)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at jp.skypencil.spotbugs.cli.App$Companion.main(App.kt:174)
        at jp.skypencil.spotbugs.cli.App.main(App.kt)

EngineRegistrar cannot create database classes

When run the analysis with native-image, it reports many similar exceptions like below:

The following errors occurred during analysis:
  Exception analyzing edu.umd.cs.findbugs.ba.NullnessAnnotation$1 using detector edu.umd.cs.findbugs.detect.CheckTypeQualifiers
    edu.umd.cs.findbugs.classfile.UncheckedAnalysisException: Error instantiating edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDatabase database
      At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getDatabase(AnalysisCache.java:500)
      At edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getDatabase(AnalysisCache.java:467)
      At edu.umd.cs.findbugs.ba.jsr305.ForwardTypeQualifierDataflowAnalysis.registerReturnValueSource(ForwardTypeQualifierDataflowAnalysis.java:203)
      At edu.umd.cs.findbugs.ba.jsr305.ForwardTypeQualifierDataflowAnalysis.registerInstructionSources(ForwardTypeQualifierDataflowAnalysis.java:111)
      At edu.umd.cs.findbugs.ba.jsr305.ForwardTypeQualifierDataflowAnalysis.registerSourceSinkLocations(ForwardTypeQualifierDataflowAnalysis.java:99)
      At edu.umd.cs.findbugs.ba.jsr305.ForwardTypeQualifierDataflowFactory.getDataflow(ForwardTypeQualifierDataflowFactory.java:72)
      At edu.umd.cs.findbugs.ba.jsr305.ForwardTypeQualifierDataflowFactory.getDataflow(ForwardTypeQualifierDataflowFactory.java:52)
      At edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowFactory.compute(TypeQualifierDataflowFactory.java:93)
      At edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDataflowFactory.getDataflow(TypeQualifierDataflowFactory.java:75)
      At edu.umd.cs.findbugs.detect.CheckTypeQualifiers.checkQualifier(CheckTypeQualifiers.java:235)
      At edu.umd.cs.findbugs.detect.CheckTypeQualifiers.visitMethodCFG(CheckTypeQualifiers.java:183)
      At edu.umd.cs.findbugs.bcel.CFGDetector.visitClass(CFGDetector.java:94)
      At edu.umd.cs.findbugs.detect.CheckTypeQualifiers.visitClass(CheckTypeQualifiers.java:137)
      At edu.umd.cs.findbugs.FindBugs2.lambda$analyzeApplication$1(FindBugs2.java:1108)
      At java.util.concurrent.FutureTask.run(FutureTask.java:264)
      At edu.umd.cs.findbugs.CurrentThreadExecutorService.execute(CurrentThreadExecutorService.java:86)
      At java.util.concurrent.AbstractExecutorService.invokeAll(AbstractExecutorService.java:242)
      At edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1118)
      At edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
      At jp.skypencil.spotbugs.cli.App.call(App.kt:85)
      At jp.skypencil.spotbugs.cli.App.call(App.kt:34)
      At picocli.CommandLine.executeUserObject(CommandLine.java:1953)
      At picocli.CommandLine.access$1300(CommandLine.java:145)
      At picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
      At picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
      At picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
      At picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
      At picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
      At picocli.CommandLine.execute(CommandLine.java:2078)
      At jp.skypencil.spotbugs.cli.App$Companion.main(App.kt:183)
      At jp.skypencil.spotbugs.cli.App.main(App.kt)
edu.umd.cs.findbugs.classfile.CheckedAnalysisException: Could not find a way to create database edu.umd.cs.findbugs.ba.jsr305.TypeQualifierDatabase
	at edu.umd.cs.findbugs.classfile.ReflectionDatabaseFactory.createDatabase(ReflectionDatabaseFactory.java:64)
	at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getDatabase(AnalysisCache.java:490)
	at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getDatabase(AnalysisCache.java:467)

It is because the code is using ReflectionDatabaseFactory to create database instances:

https://github.com/KengoTODA/spotbugs/blob/d63e473b865cfd6ad3adfa9d91fca881ed975e08/spotbugs/src/main/java/edu/umd/cs/findbugs/classfile/engine/bcel/EngineRegistrar.java#L76-L90

native image cannot load the core plugin

$ ./gradlew build nativeImage
$ build/executable/spotbugs build/libs/spotbugs-cli-1.0.0-SNAPSHOT.jar                                                                            git:graalvm*
Exception in thread "main" java.lang.ExceptionInInitializerError
        at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:315)
        at edu.umd.cs.findbugs.DetectorFactoryCollection.getCoreResource(DetectorFactoryCollection.java:353)
        at edu.umd.cs.findbugs.SystemProperties.loadPropertiesFromConfigFile(SystemProperties.java:84)
        at edu.umd.cs.findbugs.SystemProperties.<clinit>(SystemProperties.java:67)
        at com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
        at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
        at edu.umd.cs.findbugs.FindBugs2.<clinit>(FindBugs2.java:98)
        at com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
        at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
        at jp.skypencil.spotbugs.cli.App.call(App.kt:64)
        at jp.skypencil.spotbugs.cli.App.call(App.kt:23)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at jp.skypencil.spotbugs.cli.App$Companion.main(App.kt:122)
        at jp.skypencil.spotbugs.cli.App.main(App.kt)
Caused by: java.lang.IllegalArgumentException: Failed to parse uri: resource:
        at edu.umd.cs.findbugs.PluginLoader.<init>(PluginLoader.java:392)
        at edu.umd.cs.findbugs.PluginLoader.loadCorePlugin(PluginLoader.java:1442)
        at edu.umd.cs.findbugs.PluginLoader.loadInitialPlugins(PluginLoader.java:1396)
        at edu.umd.cs.findbugs.PluginLoader.<clinit>(PluginLoader.java:149)
        at com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375)
        at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295)
        ... 20 more

Performance comparison

export JAVA_HOME=path/to/graalvm-21.1.0
export JAVA8_HOME=path/to/jdk8
./gradlew assemble nativeImage
pushd build/distributions && unzip *.zip && popd

hyperfine --ignore-failure \
  './build/executable/spotbugs -Djava.home=$JAVA8_HOME --aux $JAVA8_HOME/jre/lib/rt.jar --xml=build/spotbugs.xml build/spotbugs/spotbugs-4.4.3-SNAPSHOT/lib/spotbugs.jar' \
  './build/distributions/spotbugs-cli-1.0.0-SNAPSHOT/bin/spotbugs-cli --xml=build/spotbugs.xml build/spotbugs/spotbugs-4.4.3-SNAPSHOT/lib/spotbugs.jar'

Installing a SecurityManager is not yet supported

To avoid #48, set Java 8 to java.home property like below:

export JAVA8_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/
export GRAALVM_HOME=/Users/kengo/Downloads/graalvm-ce-java11-21.1.0/Contents/Home
build/executable/spotbugs -Djava.home=$JAVA8_HOME --aux $JAVA8_HOME/jre/lib/rt.jar build/libs/spotbugs-cli-1.0.0-SNAPSHOT.jar

Then error reported to create edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue instance. Its constructor calls java.lang.System.setSecurityManager method.

Fatal error: Installing a SecurityManager is not yet supported

JavaFrameAnchor dump:

  No anchors
  
TopFrame info:

  TotalFrameSize in CodeInfoTable 48
  
VMThreads info:

  VMThread 00007fd30b7046c0  STATUS_IN_JAVA (safepoints disabled)  java.lang.Thread@0x10b6b5328
  
VM Thread State for current thread 00007fd30b7046c0:

  0 (8 bytes): com.oracle.svm.jni.JNIThreadLocalEnvironment.jniFunctions = (bytes) 
    00007fd30b7046c0: 000000010b1bd010
  
  8 (8 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.stackBoundaryTL = (Word) 1  0000000000000001
  16 (4 bytes): com.oracle.svm.core.thread.Safepoint.safepointRequested = (int) 2089960194  7c924302
  20 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.statusTL = (int) 1  00000001
  24 (32 bytes): com.oracle.svm.core.genscavenge.ThreadLocalAllocation.regularTLAB = (bytes) 
    00007fd30b7046d8: 000000011d500000 000000011d600000
    00007fd30b7046e8: 000000011d590210 000000010a8d5000
    
  
  56 (8 bytes): com.oracle.svm.core.thread.JavaThreads.currentThread = (Object) java.lang.Thread  000000010b6b5328
  64 (8 bytes): com.oracle.svm.core.stack.JavaFrameAnchors.lastAnchor = (Word) 0  0000000000000000
  72 (8 bytes): com.oracle.svm.core.heap.NoAllocationVerifier.openVerifiers = (Object) null
  80 (8 bytes): com.oracle.svm.core.identityhashcode.IdentityHashCodeSupport.hashCodeGeneratorTL = (Object) java.util.SplittableRandom  000000010cf0ddc8
  88 (8 bytes): com.oracle.svm.core.snippets.ExceptionUnwind.currentException = (Object) null
  96 (8 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.activeTimer = (Object) null
  104 (8 bytes): com.oracle.svm.graal.isolated.IsolatedCompileClient.currentClient = (Object) null
  112 (8 bytes): com.oracle.svm.graal.isolated.IsolatedCompileContext.currentContext = (Object) null
  120 (8 bytes): com.oracle.svm.jni.JNIObjectHandles.handles = (Object) com.oracle.svm.core.handles.ThreadLocalHandles  000000010cf01740
  128 (8 bytes): com.oracle.svm.jni.JNIThreadLocalPendingException.pendingException = (Object) null
  136 (8 bytes): com.oracle.svm.jni.JNIThreadLocalPinnedObjects.pinnedObjectsListHead = (Object) null
  144 (8 bytes): com.oracle.svm.jni.JNIThreadOwnedMonitors.ownedMonitors = (Object) null
  152 (8 bytes): com.oracle.svm.core.thread.VMThreads.IsolateTL = (Word) 4472176640  000000010a900000
  160 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadHandleTL = (Word) 4582118912  00000001111d9600
  168 (8 bytes): com.oracle.svm.core.thread.VMThreads.OSThreadIdTL = (Word) 4582118912  00000001111d9600
  176 (8 bytes): com.oracle.svm.core.thread.VMThreads.nextTL = (Word) 0  0000000000000000
  184 (8 bytes): com.oracle.svm.core.thread.VMThreads.unalignedIsolateThreadMemoryTL = (Word) 140544406734528  00007fd30b7046c0
  192 (4 bytes): com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.yellowZoneStateTL = (int) -16843010  fefefefe
  196 (4 bytes): com.oracle.svm.core.snippets.ImplicitExceptions.implicitExceptionsAreFatal = (int) 0  00000000
  200 (4 bytes): com.oracle.svm.core.thread.ThreadingSupportImpl.currentPauseDepth = (int) 0  00000000
  204 (4 bytes): com.oracle.svm.core.thread.VMThreads$ActionOnExitSafepointSupport.actionTL = (int) 0  00000000
  208 (4 bytes): com.oracle.svm.core.thread.VMThreads$ActionOnTransitionToJavaSupport.actionTL = (int) 0  00000000
  212 (4 bytes): com.oracle.svm.core.thread.VMThreads$StatusSupport.safepointsDisabledTL = (int) 1  00000001
  
VMOperation dump:

  No VMOperation in progress
  
  The 10 most recent VM operation status changes (oldest first):
    
  
Dump Counters:

  
Raw Stacktrace:

  00007ff7ba77ccf0: 000000011d58fae0 0000000000000000
  00007ff7ba77cd00: 000000010af2cf68 000000010a900000
  00007ff7ba77cd10: 00000001069c1f4a 0000000105818974
  00007ff7ba77cd20: 000000010b55b858 00000001069c1f4a
  00007ff7ba77cd30: 000000010b811c40 000000010631c836
  00007ff7ba77cd40: 66a1d0c80279b2fb 000000011d584ff8
  00007ff7ba77cd50: 0000000012c84f00 000000011c5dbd68
  00007ff7ba77cd60: 000000011d584f00 000000010cf01120
  
Stacktrace Stage 0:

  SP 00007ff7ba77ccf0 IP 00000001057e9f30  FrameSize 48
  SP 00007ff7ba77cd20 IP 0000000105818974  FrameSize 16
  SP 00007ff7ba77cd30 IP 00000001069c1f4a  FrameSize 16
  SP 00007ff7ba77cd40 IP 000000010631c836  FrameSize 160
  SP 00007ff7ba77cde0 IP 000000010631fa98  FrameSize 64
  SP 00007ff7ba77ce20 IP 000000010631fc7e  FrameSize 32
  SP 00007ff7ba77ce40 IP 000000010635bede  FrameSize 32
  SP 00007ff7ba77ce60 IP 0000000106220fe5  FrameSize 32
  SP 00007ff7ba77ce80 IP 0000000106227956  FrameSize 32
  SP 00007ff7ba77cea0 IP 000000010611ba13  FrameSize 480
  SP 00007ff7ba77d080 IP 000000010612a547  FrameSize 112
  SP 00007ff7ba77d0f0 IP 000000010727f778  FrameSize 64
  SP 00007ff7ba77d130 IP 000000010727fad3  FrameSize 16
  SP 00007ff7ba77d140 IP 0000000107e3a0da  FrameSize 80
  SP 00007ff7ba77d190 IP 0000000107e32b88  FrameSize 48
  SP 00007ff7ba77d1c0 IP 0000000107e332c3  FrameSize 32
  SP 00007ff7ba77d1e0 IP 0000000107d57c9e  FrameSize 48
  SP 00007ff7ba77d210 IP 0000000107e39152  FrameSize 64
  SP 00007ff7ba77d250 IP 000000010727f258  FrameSize 32
  SP 00007ff7ba77d270 IP 00000001057bd67a  FrameSize 112
  
Stacktrace Stage 1:

  SP 00007ff7ba77ccf0 IP 00000001057e9f30  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77cd20 IP 0000000105818974  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77cd30 IP 00000001069c1f4a  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77cd40 IP 000000010631c836  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77cde0 IP 000000010631fa98  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77ce20 IP 000000010631fc7e  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77ce40 IP 000000010635bede  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77ce60 IP 0000000106220fe5  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77ce80 IP 0000000106227956  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77cea0 IP 000000010611ba13  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77d080 IP 000000010612a547  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77d0f0 IP 000000010727f778  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77d130 IP 000000010727fad3  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77d140 IP 0000000107e3a0da  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77d190 IP 0000000107e32b88  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77d1c0 IP 0000000107e332c3  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77d1e0 IP 0000000107d57c9e  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77d210 IP 0000000107e39152  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77d250 IP 000000010727f258  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  SP 00007ff7ba77d270 IP 00000001057bd67a  com.oracle.svm.core.code.CodeInfo@0x10b5e44e0 name = image code
  
Stacktrace Stage 2:

  SP 00007ff7ba77ccf0 IP 00000001057e9f30  [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shutdown(VMErrorSubstitutions.java:111)
  SP 00007ff7ba77ccf0 IP 00000001057e9f30  [image code] com.oracle.svm.core.jdk.VMErrorSubstitutions.shouldNotReachHere(VMErrorSubstitutions.java:104)
  SP 00007ff7ba77cd20 IP 0000000105818974  [image code] com.oracle.svm.core.util.VMError.shouldNotReachHere(VMError.java:63)
  SP 00007ff7ba77cd30 IP 00000001069c1f4a  [image code] java.lang.System.setSecurityManager(System.java:322)
  SP 00007ff7ba77cd40 IP 000000010631c836  [image code] edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue.<init>(TypeQualifierValue.java:157)
  SP 00007ff7ba77cde0 IP 000000010631fa98  [image code] edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue.getValue(TypeQualifierValue.java:298)
  SP 00007ff7ba77ce20 IP 000000010631fc7e  [image code] edu.umd.cs.findbugs.ba.jsr305.TypeQualifierValue.getValue(TypeQualifierValue.java:306)
  SP 00007ff7ba77ce40 IP 000000010635bede  [image code] edu.umd.cs.findbugs.ba.npe.TypeQualifierNullnessAnnotationDatabase.<init>(TypeQualifierNullnessAnnotationDatabase.java:70)
  SP 00007ff7ba77ce60 IP 0000000106220fe5  [image code] edu.umd.cs.findbugs.ba.AnalysisContext.getNullnessAnnotationDatabase(AnalysisContext.java:1055)
  SP 00007ff7ba77ce80 IP 0000000106227956  [image code] edu.umd.cs.findbugs.ba.AnalysisContext.updateDatabases(AnalysisContext.java:1008)
  SP 00007ff7ba77cea0 IP 000000010611ba13  [image code] edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:1061)
  SP 00007ff7ba77d080 IP 000000010612a547  [image code] edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:309)
  SP 00007ff7ba77d0f0 IP 000000010727f778  [image code] jp.skypencil.spotbugs.cli.App.call(App.kt:82)
  SP 00007ff7ba77d130 IP 000000010727fad3  [image code] jp.skypencil.spotbugs.cli.App.call(App.kt:34)
  SP 00007ff7ba77d140 IP 0000000107e3a0da  [image code] picocli.CommandLine.executeUserObject(CommandLine.java:1953)
  SP 00007ff7ba77d190 IP 0000000107e32b88  [image code] picocli.CommandLine.access$1300(CommandLine.java:145)
  SP 00007ff7ba77d190 IP 0000000107e32b88  [image code] picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
  SP 00007ff7ba77d1c0 IP 0000000107e332c3  [image code] picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
  SP 00007ff7ba77d1e0 IP 0000000107d57c9e  [image code] picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
  SP 00007ff7ba77d1e0 IP 0000000107d57c9e  [image code] picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
  SP 00007ff7ba77d210 IP 0000000107e39152  [image code] picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
  SP 00007ff7ba77d210 IP 0000000107e39152  [image code] picocli.CommandLine.execute(CommandLine.java:2078)
  SP 00007ff7ba77d250 IP 000000010727f258  [image code] jp.skypencil.spotbugs.cli.App$Companion.main(App.kt:174)
  SP 00007ff7ba77d270 IP 00000001057bd67a  [image code] jp.skypencil.spotbugs.cli.App.main(App.kt)
  SP 00007ff7ba77d270 IP 00000001057bd67a  [image code] com.oracle.svm.core.JavaMainWrapper.runCore(JavaMainWrapper.java:146)
  SP 00007ff7ba77d270 IP 00000001057bd67a  [image code] com.oracle.svm.core.JavaMainWrapper.run(JavaMainWrapper.java:182)
  SP 00007ff7ba77d270 IP 00000001057bd67a  [image code] com.oracle.svm.core.code.IsolateEnterStub.JavaMainWrapper_run_5087f5482cc9a6abc971913ece43acb471d2631b(IsolateEnterStub.java:0)
  
[Heap settings and statistics: 
  Supports isolates: true
  Object reference size: 8
  Incremental collections: 0
  Complete collections: 0]

[Native image heap boundaries: 
  ReadOnly Primitives: 0x10a901028 .. 0x10ade4ec0
  ReadOnly References: 0x10ade4ed0 .. 0x10b1bc868
  ReadOnly Relocatables: 0x10b1bd000 .. 0x10b509788
  Writable Primitives: 0x10b50a000 .. 0x10b632388
  Writable References: 0x10b632398 .. 0x10bd27240
  Writable Huge: 0x0 .. 0x0
  ReadOnly Huge: 0x10be00030 .. 0x10ce23bb0]


[Heap:
  [Young generation: 
    [Eden: 
      [edenSpace:
        aligned: 1044440/1 unaligned: 0/0
        aligned chunks:
          0x10ee00000 (0x10ee01028-0x10ee01178)]]
    [Survivors: 
      ]]
  [Old generation: 
    [oldFromSpace:
      aligned: 0/0 unaligned: 0/0]
    [oldToSpace:
      aligned: 0/0 unaligned: 0/0]
    ]
  [Unused:
    aligned: 0/0]]

Fatal error: Installing a SecurityManager is not yet supported

org.apache.logging.slf4j.SLF4JServiceProvider exists in CLASSPATH

$ build/executable/spotbugs --aux /Users/kengo/Downloads/graalvm-ce-java11-21.1.0/Contents/Home/lib/jrt-fs.jar build/libs/spotbugs-cli-1.0.0-SNAPSHOT.jar
SLF4J: Class path contains multiple SLF4J providers.
SLF4J: Found provider [org.apache.logging.slf4j.SLF4JServiceProvider@12b10815]
SLF4J: Found provider [org.slf4j.simple.SimpleServiceProvider@478c5cbb]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual provider is of type [org.apache.logging.slf4j.SLF4JServiceProvider@12b10815]

runtimeClasspath of spotbugs-cli

runtimeClasspath - Runtime classpath of compilation 'main' (target  (jvm)).
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.0-RC2
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0-RC2
|    |    +--- org.jetbrains:annotations:13.0
|    |    \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.6.0-RC2
|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.0-RC2
|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0-RC2 (*)
+--- info.picocli:picocli:4.6.2
\--- org.slf4j:slf4j-simple:1.8.0-beta4

but we have no org.apache.logging.log4j:log4j-slf4j18-impl in the classpath. It is used only in the Eclipse plugin.

runtimeClasspath from SpotBugs

runtimeClasspath - Runtime classpath of source set 'main'.
+--- org.ow2.asm:asm:9.2
+--- org.ow2.asm:asm-analysis:9.2
|    \--- org.ow2.asm:asm-tree:9.2
|         \--- org.ow2.asm:asm:9.2
+--- org.ow2.asm:asm-commons:9.2
|    +--- org.ow2.asm:asm:9.2
|    +--- org.ow2.asm:asm-tree:9.2 (*)
|    \--- org.ow2.asm:asm-analysis:9.2 (*)
+--- org.ow2.asm:asm-tree:9.2 (*)
+--- org.ow2.asm:asm-util:9.2
|    +--- org.ow2.asm:asm:9.2
|    +--- org.ow2.asm:asm-tree:9.2 (*)
|    \--- org.ow2.asm:asm-analysis:9.2 (*)
+--- org.apache.bcel:bcel:6.5.0
+--- net.jcip:jcip-annotations:1.0
+--- org.dom4j:dom4j:2.1.3
+--- org.apache.commons:commons-lang3:3.12.0
+--- org.apache.commons:commons-text:1.9
|    \--- org.apache.commons:commons-lang3:3.11 -> 3.12.0
+--- org.slf4j:slf4j-api:1.8.0-beta4
+--- project :spotbugs-annotations
|    +--- com.google.code.findbugs:jsr305:3.0.2
|    \--- org.junit:junit-bom:5.8.1
+--- com.google.code.gson:gson:2.8.9
+--- org.junit:junit-bom:5.8.1
+--- jaxen:jaxen:1.2.0
\--- net.sf.saxon:Saxon-HE:10.6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.