-
-
Notifications
You must be signed in to change notification settings - Fork 821
Split rules module into a module per rule set #2865
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
| } | ||
|
|
||
| private fun Config.valueOrDefaultCommaSeparated( | ||
| fun Config.valueOrDefaultCommaSeparated( |
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.
This one was a duplicate in detekt-rules.
We use this api/internal implementation now in the rule sets.
Imo we should later make this function part of the public api as we want to support yaml lists.
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.
π€ do we want to encorage the support of yaml lists AND comma separated strings? I don't think so, I mean, I think that it's better to only support yaml lists.
This significantly improves build and test times.
sounds like a missing dependecy? |
Codecov Report
@@ Coverage Diff @@
## master #2865 +/- ##
============================================
+ Coverage 80.66% 80.78% +0.11%
- Complexity 2343 2346 +3
============================================
Files 388 388
Lines 7035 7050 +15
Branches 1288 1288
============================================
+ Hits 5675 5695 +20
+ Misses 716 709 -7
- Partials 644 646 +2
Continue to review full report at Codecov.
|
| val engine = KotlinJsr223JvmLocalScriptEngineFactory().scriptEngine as? KotlinJsr223JvmLocalScriptEngine | ||
| return requireNotNull(engine) { "Kotlin script engine not supported" } |
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.
Good one!
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.
πππ Good one. I'm not sure it's just an idea that I had. Is it better :detekt-rules-style or :detekt-rules:style? I mean, all the rule modules as submodules of :detekt-rules
| compileOnly(project(":detekt-api")) | ||
| compileOnly(project(":detekt-metrics")) |
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.
Do this have sense to be here? I mean, should we try to remove these two dependencies in the future?
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.
api is meant to be compileOnly for rules.
The metrics one is used for lines of code. Imo it is okay, not as bad as depending on core.
| UnusedPrivateMemberNegative("/UnusedPrivateMemberNegative.kt"); | ||
|
|
||
| fun path(): Path = resourceAsPath(file) | ||
| } |
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.
Didn't notice that this file is already this short! Good work everyone ππππ
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.
Good one. I'm not sure it's just an idea that I had. Is it better
:detekt-rules-styleor:detekt-rules:style? I mean, all the rule modules as submodules of:detekt-rules
If we would develop in a monorepo with different projects I would also favor detekt-rules:style to have a clearer project structure.
However Gradle's project.subprojects returns just the modules one level deeper. Therefore our build scripts would need to be more complex and test if a module is a "meta-module" which just groups other modules and does not need plugins like kotlin and stuff for test.
Lets keep every module top level for now.
|
Awesome change @arturbosch π |
This significantly improves build and test times.
I think we now have a perfectly parallel build xD