-
-
Notifications
You must be signed in to change notification settings - Fork 821
Introduce tooling api module #2861
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2861 +/- ##
============================================
- Coverage 80.78% 80.28% -0.50%
- Complexity 2346 2417 +71
============================================
Files 388 421 +33
Lines 7050 7359 +309
Branches 1288 1346 +58
============================================
+ Hits 5695 5908 +213
- Misses 709 756 +47
- Partials 646 695 +49
Continue to review full report at Codecov.
|
BraisGabin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't continue with the review right now. I leave the current comments and I'll try to finish the review this nigh or tomorrow.
I really like this refecator. Great job!
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/config/DefaultConfig.kt
Show resolved
Hide resolved
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/tooling/DefaultAnalysisResult.kt
Show resolved
Hide resolved
detekt-tooling/src/main/kotlin/io/github/detekt/tooling/api/AnalysisResult.kt
Outdated
Show resolved
Hide resolved
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/tooling/AnalysisFacade.kt
Outdated
Show resolved
Hide resolved
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/tooling/Lifecycle.kt
Outdated
Show resolved
Hide resolved
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/tooling/Lifecycle.kt
Show resolved
Hide resolved
detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/runners/ConfigExporter.kt
Outdated
Show resolved
Hide resolved
detekt-core/src/main/kotlin/io/gitlab/arturbosch/detekt/core/KtTreeCompiler.kt
Show resolved
Hide resolved
|
I'm not sure why jacoco fails on detekt-core with Java8 but I can reproduce this locally... |
This is a really strange one! But taking a look at the gradle test report I get: So Gradle can't find Now I stumbled upon this issue junit-team/junit-framework#2322 .... |
BraisGabin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice one. Huge, but really good. ProcessingSettings is kind of a god class but I think that we can think about it later.
| } | ||
|
|
||
| private val isColoredOutputSupported: Boolean = !IS_WINDOWS | ||
| private val isColoredOutputSupported: Boolean = !SystemInfo.isWindows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Add tooling support for MaxIssuePolicy.
Removes special treatment inside DetektFacade
|
I've fixed the build/classloader issue. Edit: the code coverage changes on |
|
Should we deprecate |
Already done :)
|
ups! my bad. I had this as an annotation in my note book from when I did the code review and I forgot to comment it at that moment and then I didn't recheck. |
Sorry for the huge PR upfront. Please review this commit by commit.
I want to make this right without a breaking change and an API which will work for the gradle, sonar, maven, bazel, intellij and cli integrations of the core module.
Why an extra tooling api?
coredirectly via the horribleProcessingSettingsclass.cliis/(was) morecorethancoreNotable additional changes in this PR:
ProcessingSettingsis stillpublicbut only used internally incore. We can better refactor/remove this class in the future. Edit: I've refactored the class.coredecides when to fail the build via aMaxIssuePolicysealed class.UnstableApiannotation now has areasonproperty.createRunnertest helper which usesNullPrintStreamby default.formattingmodule does not depend oncoreanymore!Usages: