Filter not applied
See original GitHub issueI set include the following into my buld.gradle
:
ktlint {
debug = true
verbose = true
filter {
exclude("**/generated/**")
}
}
However, the files below generated are STILL checked:
$ ./gradlew ktlintCheck
> Task :nano-container:ktlintMainSourceSetCheck FAILED
[DEBUG] Discovered ruleset "standard"
[DEBUG] Discovered reporter "plain"
[DEBUG] Discovered reporter "json"
[DEBUG] Discovered reporter "checkstyle"
[DEBUG] Initializing "plain" reporter with {verbose=true, color=true}
[DEBUG] Initializing "plain" reporter with {verbose=true, color=true}, output=XXX/nano-container/build/reports/ktlint/ktlintMainSourceSetCheck.txt
[DEBUG] Checking XXX/nano-container/build/generated/source/BuildInfo.kt
...
[DEBUG] Discovered .editorconfig (XXX) {indent_size=2}
XXX/nano-container/build/generated/source/BuildInfo.kt:1:1: Wildcard import (cannot be auto-corrected) (no-wildcard-imports)
XXX/nano-container/build/generated/source/BuildInfo.kt:246:14: Missing spacing before "=" (op-spacing)
"plain" report written to XXX/nano-container/build/reports/ktlint/ktlintMainSourceSetCheck.txt
[DEBUG] 879ms / 6 file(s) / 2 error(s)
The file XXX/nano-container/build/generated/source/BuildInfo.kt
should have been ignored.
./gradlew --version
------------------------------------------------------------
Gradle 5.2.1
------------------------------------------------------------
Build time: 2019-02-08 19:00:10 UTC
Revision: f02764e074c32ee8851a4e1877dd1fea8ffb7183
Kotlin DSL: 1.1.3
Kotlin: 1.3.20
Groovy: 2.5.4
Ant: Apache Ant(TM) version 1.9.13 compiled on July 10 2018
JVM: 1.8.0_191 (Oracle Corporation 25.191-b12)
OS: Linux 4.15.0-46-generic amd64
Issue Analytics
- State:
- Created 4 years ago
- Comments:5
Top Results From Across the Web
5 Reasons why your Excel filter may not be working
5 Reasons why your Excel filter may not be working · 1. Check that you have selected all of the data · 2....
Read more >Excel Filter Not Working? Try These Fixes - Tech News Today
How to Fix Excel Filter Not Working? · Select All Data From Sheet · Remove Blank Rows/Columns · Unhide Rows or Columns ·...
Read more >7 Reasons☝️ Why Your Excel Filter May Not Be Working
7 Reasons☝️ Why Your Excel Filter May Not Be Working · 1. Check that you have selected all the data. · 2. Check...
Read more >Excel filter not working properly [Fixed] - The Windows Club
Excel filter not working properly · 1] Check for error · 2] Select the entire data · 3] Unhide hidden rows and columns...
Read more >The filter function is not applied to all rows
Hi, I could find previous posts with this problem, but the filter function is not being applied to all rows of a sheet....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Okay, I think I found the underlying issue.
Actually,
BuildInfo.kt
sits atbuild/generated/source/BuildInfo.kt
and is added to the build via:But, if I do …
… it just prints
BuildInfo.kt
, so the prefix is stripped from the filename. I guess that string-patterns are applied to the stripped and not absolute path.Here is the workaround:
However that will kick in if there is any “/generated/” in the full path.
This will exclude all files in the project that have
/generated/
in their path relative to the project directory. Worth adding to README?