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
Custom Detekt task doesn't respect include()
function
#7023
Comments
Includes/excludes applies filters to the paths passed to |
Sorry I failed to mention that I have a global Detekt config block that passes the source. Also doesn't detekt have a default value for this anyway? I already have the following: tasks.withType<Detekt>.configureEach {
setSource(project.layout.projectDirectory)
} Typing down this code on my phone, so it might be wrong, but you get the idea. I even copied this over to my custom task and it still doesn't work. |
Can you please put a self contained reproducer together? That will make it much easier to have a look at what's going on. |
Hey @3flex, just wanted to add another thing I noticed. In the same project structure that I linked, the What's wrong here? Does Detekt just not play nice when used in included builds? |
Expected Behavior
I have this custom detekt task to which I pass only the files that were changed because I don't want to run full
detekt
. I'm passing the files via include(). I expect it to run against this subset of files onlyObserved Behavior
Running the task with ``--info
says it has
NO-SOURCE`, even though I am passing a list of files.Steps to Reproduce
Create the task as such:
GitChangedFilesValueSource
is defined as such:Run
./gradlew fastDetekt
, it always succeeds even if you intentionally break some detekt rules in any of your filesContext
Your Environment
--scan
option when running the gradle task):The text was updated successfully, but these errors were encountered: