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
Cli provides list of input files #7007
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7007 +/- ##
=========================================
Coverage 83.72% 83.72%
+ Complexity 3952 3950 -2
=========================================
Files 578 578
Lines 12153 12163 +10
Branches 2503 2504 +1
=========================================
+ Hits 10175 10184 +9
- Misses 734 735 +1
Partials 1244 1244 ☔ View full report in Codecov by Sentry. |
73cc7ed
to
0b46274
Compare
detekt-cli/src/main/kotlin/io/gitlab/arturbosch/detekt/cli/Spec.kt
Outdated
Show resolved
Hide resolved
detekt-cli/src/test/kotlin/io/gitlab/arturbosch/detekt/cli/CliArgsSpec.kt
Show resolved
Hide resolved
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.
See inline comments - particularly the one for path filtering.
0b46274
to
5e93cab
Compare
5e93cab
to
7c61906
Compare
I broke something... I need to check. |
7c61906
to
0a3cd33
Compare
@@ -3,7 +3,7 @@ | |||
-b | |||
./config/detekt/baseline.xml | |||
-ex | |||
**/resources/**,**/detekt*/build/**,**/build-logic/build/**,**/build-logic/bin/** | |||
**/resources/**,detekt*/build/**,build-logic/build/**,build-logic/bin/** |
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.
Now that we don't take into account the absolute path when you provide excludes/includes you need to be more careful with the initial **/
. **/
match at least one directory. If your directory is on the basePath then it doesn't match. For that reason I needed to update these excludes.
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.
If your directory on the basePath then it doesn't match
This will need to be called out loud & clear in the release notes - I also don't recall if basepath is always set but we should make sure it's always set to a reasonable default value by default.
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.
(it's the right thing to do though!)
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.
About default values for bashPath
:
cli
uses the working directory.gradlePlugin
as far as I saw it passes the project path.
Both of them seems like good default values to me.
And about call out this change, I agree. This is a breaking change on the cli
. But I'm not sure what can I do now about it.
0a3cd33
to
7c40132
Compare
7c40132
to
0226eb0
Compare
0226eb0
to
604a6aa
Compare
89ced74
to
273a9a9
Compare
604a6aa
to
6be6482
Compare
This is just the first step. Now the
cli
provides a list of files instead of directories and rules for include/exclude files.After this change we can do things like #7009 where we can remove a lot of code from
:detekt-core
and simplify:detekt-tooling
Related with #6866