-
-
Notifications
You must be signed in to change notification settings - Fork 18
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 support for multiple input directories #203
Conversation
… delimited by commas
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## main #203 +/- ##
============================================
+ Coverage 73.93% 74.40% +0.46%
- Complexity 37 38 +1
============================================
Files 9 9
Lines 165 168 +3
Branches 39 40 +1
============================================
+ Hits 122 125 +3
Misses 17 17
Partials 26 26
|
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.
Code looks good, though ValidFile2.kt
needs to be added to baseline.xml since there are two issues in it that we want to ignore.
/home/runner/work/detekt-maven-plugin/detekt-maven-plugin/src/test/resources/code-samples/valid2/ValidFile2.kt:1:1: Package name should match the pattern: [a-z]+(\.[a-z][A-Za-z0-9]*)* [PackageNaming]
/home/runner/work/detekt-maven-plugin/detekt-maven-plugin/src/test/resources/code-samples/valid2/ValidFile2.kt:1:1: The package declaration does not match the actual file location. [InvalidPackageDeclaration]
88cf38d
to
48eadce
Compare
Thank you. I'd forgotten about the baseline, have pushed the fix in 48eadce. |
@Ozsie thanks for the review. Are you happy to merge this in please, as I don't have write access. |
The detekt CLI docs indicate that multiple input directories can be supplied to it, using the -i/--input switch, provided they're delimited by commas. I've recently written a git hook which I'd like to use in conjunction with the detekt maven plugin so that only modified files are scanned by detekt. This will dramatically decrease the time it takes for pre-commit checks to happen, as the code base I'm working with is particularly large and scanning all files is a lengthy operation.
The changes here enable multiple directories to be provided. Each in turn is verified before being passed through to detekt. If any directories can't be resolved, the process is aborted and the offending paths are logged to standard out.