Add detekt compiler plugin to main project#5492
Conversation
There was a problem hiding this comment.
detekt found more than 10 potential problems in the proposed changes. Check the Files changed tab for more details.
Codecov Report
@@ Coverage Diff @@
## main #5492 +/- ##
===========================================
+ Coverage 0 85.89% +85.89%
- Complexity 0 3637 +3637
===========================================
Files 0 516 +516
Lines 0 12179 +12179
Branches 0 2171 +2171
===========================================
+ Hits 0 10461 +10461
- Misses 0 628 +628
- Partials 0 1090 +1090
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
First of all, big shoutout to you @3flex! Great stuff 👍
I understand, that we are confident enough that the standard and compiler plugin can coexist for upcoming versions, without interfering each other. If so, I'm very pleased with merging this.
Agreed.
I think the focus should be on the restrictions for the compiler plugin. Maybe, the readme from the compiler plugin can be copied over to a separate |
bb0b94f to
170f46f
Compare
This only has an effect when io.github.detekt.gradle.compiler-plugin is applied to the project. It has no effect on io.gitlab.arturbosch.detekt.
84ba660 to
a2d08e3
Compare
a2d08e3 to
eb9d851
Compare
|
I propose to add docs in a separate PR. I'll open an issue for tracking once this is merged. |
eb9d851 to
0a02561
Compare
This brings the detekt compiler plugin into the primary project. Aside from bringing the code over, this also makes changes to the Gradle plugin so that the standard plugin as well as the compiler plugin can be used in the same project. This wasn't previously possible due to the naming conflict on the
detektextension which was applied by both Gradle plugins.I'd like to get this merged, then we can work on:
$kotlinVersion-$pluginVersione.g.1.7.20-1.22.0-RC2InvalidPackageDeclarationfailures (means we can skip steps 3 & 4 below)To test:
plugins { id("io.github.detekt.gradle.compiler-plugin") }detekt.ymlconfig file and disableInvalidPackageDeclaration(see detekt-compiler-plugin/issues/15):buildUponDefaultConfig = true, e.g.:detekt { buildUponDefaultConfig = true }The compiler plugin cannot be applied to the detekt project itself due to circular dependencies, which I couldn't work around, but hope to some time in future.
Closes #3520