-
-
Notifications
You must be signed in to change notification settings - Fork 791
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
Add detekt compiler plugin to main project #5492
Conversation
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.
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
detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/extensions/DetektExtension.kt
Show resolved
Hide resolved
detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/extensions/DetektExtension.kt
Show resolved
Hide resolved
detekt-gradle-plugin/src/main/kotlin/io/github/detekt/gradle/Constants.kt
Outdated
Show resolved
Hide resolved
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. |
detekt-gradle-plugin/src/main/kotlin/io/gitlab/arturbosch/detekt/extensions/DetektExtension.kt
Fixed
Show fixed
Hide fixed
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
detekt
extension which was applied by both Gradle plugins.I'd like to get this merged, then we can work on:
$kotlinVersion-$pluginVersion
e.g.1.7.20-1.22.0-RC2
InvalidPackageDeclaration
failures (means we can skip steps 3 & 4 below)To test:
plugins { id("io.github.detekt.gradle.compiler-plugin") }
detekt.yml
config file and disableInvalidPackageDeclaration
(see detekt-compiler-plugin/issues/15):buildUponDefaultConfig = true
, e.g.: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