You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Check task filters out incremental changes of type DIRECTORY or REMOVED. If the only changes to a source set as reported by Gradle have those types, then the resulting set of source files after the filter is empty. This causes ktlint to be invoked with an args file that does not list any source files to check. In that case, the default behavior of ktlint is to check ALL source files in the current directory.
I believe the correct behavior in the case where Gradle reports incremental changes, but all such changes are filtered out, would be to set the didWork property to false and return without executing ktlint.
I will try to create a repro and possibly submit a PR when I have time.
The text was updated successfully, but these errors were encountered:
Versions:
ktlint-gradle: 9.1.1
Gradle version: 6.1.1
Kotlin version: 1.3.61
The
Check
task filters out incremental changes of typeDIRECTORY
orREMOVED
. If the only changes to a source set as reported by Gradle have those types, then the resulting set of source files after the filter is empty. This causesktlint
to be invoked with an args file that does not list any source files to check. In that case, the default behavior ofktlint
is to check ALL source files in the current directory.I believe the correct behavior in the case where Gradle reports incremental changes, but all such changes are filtered out, would be to set the
didWork
property to false and return without executingktlint
.I will try to create a repro and possibly submit a PR when I have time.
The text was updated successfully, but these errors were encountered: