-
Notifications
You must be signed in to change notification settings - Fork 516
Closed
Labels
cliktlint command line interfacektlint command line interface
Milestone
Description
Expected Behavior
Running ktlint
w/o specifying any input files previously made it search for *.kt
and *.kts
files, starting from the current directory, e. g.:
$ ./ktlint
14:54:01.402 [main] INFO com.pinterest.ktlint.internal.KtlintCommandLine - Enable default patterns [**/*.kt, **/*.kts]
10:56:53.905 [main] DEBUG com.pinterest.ktlint.internal.KtlintCommandLine - 6821ms / 14 file(s) / 167 error(s)
This behaviour still holds when ktlint
is run from the command line on Linux or Mac OS X.
Observed Behavior
Yet, using just the very same command line switches on Windows (i. e. when running ktlint
from Git Bash) results in no input files being found:
15:01:09.889 [main] INFO com.pinterest.ktlint.internal.KtlintCommandLine - Enable default patterns [**\\*.kt, **\\*.kts]
15:01:10.457 [main] ERROR com.pinterest.ktlint.internal.KtlintCommandLine - No files matched [**\\*.kt, **\\*.kts]
This is a clear regression against version 0.46.1 and, apparently, has been caused by the recent changes which re-enable (sort of — see #1601) the parsing of Ant-like path patterns (e.g.: **/*.kt
) — which was broken in version 0.46.1.
Steps to Reproduce
- Download the fat JAR from https://github.com/pinterest/ktlint/releases/tag/0.47.0.
- Run the far JAR against any non-empty codebase on Windows:
java -Xmx512m --add-opens java.base/java.lang=ALL-UNNAMED -jar ktlint
Your Environment
- Version of ktlint used: 0.47
- Relevant parts of the
.editorconfig
settings: none - Name and version (or code for custom task) of integration used (Gradle plugin, Maven plugin, command line, custom Gradle task): CLI
- Version of Gradle used (if applicable): N/A
- Operating System and version:
MINGW64_NT-10.0-19043 unit-725 3.3.4-341.x86_64 2022-05-09 11:56 UTC x86_64 Msys
Linux unit-725 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 GNU/Linux
0x6675636b796f75676974687562, unix-junkie, petertrr, sanyavertolet, orchestr7 and 1 more
Metadata
Metadata
Assignees
Labels
cliktlint command line interfacektlint command line interface