Closed azdanov closed 4 years ago
After the restart, I couldn't reproduce the exception, but the scan seemed to take forever. But the stop button didn't work. I had to do a manual restart of both IDEA and Docker.
Here's the project I was trying to analyze: https://github.com/karpunets/wallet
@azdanov The plugin adds an action "Analyze Code Smells and Duplications" into "Analyze" menu therefore if you are using PHPStorm you will see the null pointer exception and the action will be added to "Other" menu, could you please confirm that? Btw, I'm going to remove it soon.
For the scan take forever problem, may be you have a lot of library's files such as vendor
folder (if you are using Laravel framework). Please follow this document to add some ignore path patterns to your code climate engine. In my machine - MacBook 15inch 2018 - it takes ~3 seconds per 1000 line of code.
Sample .codeclimate.yml
in my machine (kotlin project):
version: '2'
engines:
duplication:
enabled: true
config:
languages:
- kotlin
checks:
argument-count:
enabled: true
config:
threshold: 8
complex-logic:
enabled: true
config:
threshold: 4
file-lines:
enabled: true
config:
threshold: 300
method-complexity:
enabled: true
config:
threshold: 12
method-count:
enabled: true
config:
threshold: 30
method-lines:
enabled: true
config:
threshold: 30
nested-control-flow:
enabled: true
config:
threshold: 4
return-statements:
enabled: true
config:
threshold: 5
similar-code:
enabled: true
config:
threshold: 100
identical-code:
enabled: true
config:
threshold: 100
exclude_patterns:
- '**/build/'
- '**/src/test'
- '**/src/commonTest'
- 'foundation/src/commonMain/kotlin/net/ntworld/foundation/FakedData.kt'
- 'foundation/src/jvmMain/kotlin/net/ntworld/foundation/util/JavaFakerWrapper.kt'
After the restart, I couldn't reproduce the exception, but the scan seemed to take forever. But the stop button didn't work. I had to do a manual restart of both IDEA and Docker.
Here's the project I was trying to analyze: https://github.com/karpunets/wallet
Sorry, I miss this comment. I tried your repo and this is the result on my computer:
Could you please try command codeclimate analyze
on your machine and check how long it take?
Thanks for the codeclimate analyze
tip. On my machine it took 5m26s.
Happened when I've tried to run the scan. And then I couldn't stop it. Had to restart IntelliJ. Also, the docker started to hang and take 100% of the CPU. Had to restart docker too.
Using the latest IDEA and Docker as of today's date.