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
When I run ktlint 0.44.0 on a file, the first lines of output look to be debug logs.
For example:
❯ ktlint myFile.kt
11:13:05.636 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with "baseline" id.
11:13:05.637 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with "checkstyle" id.
11:13:05.637 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with "json" id.
11:13:05.637 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with "html" id.
11:13:05.637 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with "plain" id.
11:13:05.637 [main] DEBUG com.pinterest.ktlint.Main - Discovered reporter with "sarif" id.
11:13:05.638 [main] DEBUG com.pinterest.ktlint.Main - Initializing "plain" reporter with {verbose=false, color=false, color_name=DARK_GRAY}
myFile.kt:1:1: File must end with a newline (\n)
11:13:06.422 [main] DEBUG com.pinterest.ktlint.Main - 1007ms / 1 file(s) / 1 error(s)
Is there a way to disable printing these logs?
As you can see from the invocation of ktlint, I'm not passing in the --debug flag nor the --verbose flag.
Since I'm not passing these flags in, I'd expect the invocation of ktlint to just produce something like
❯ ktlint myFile.kt
myFile.kt:1:1: File must end with a newline (\n)
I've implemented ktlint as a precommit hook for our team, and I'd like to make sure the output is as easy to read and act on as possible so that my teammates are less likely to get annoyed and more likely to believe that having a linter is a good idea.
Looking at the implementation that probably generated these log lines, it appears they're created by a call to logger.debug, which I'd expect would only actually print something if the --debug flag was passed in.
When I run ktlint 0.44.0 on a file, the first lines of output look to be debug logs.
For example:
Is there a way to disable printing these logs?
As you can see from the invocation of
ktlint
, I'm not passing in the--debug
flag nor the--verbose
flag.Since I'm not passing these flags in, I'd expect the invocation of ktlint to just produce something like
I've implemented ktlint as a precommit hook for our team, and I'd like to make sure the output is as easy to read and act on as possible so that my teammates are less likely to get annoyed and more likely to believe that having a linter is a good idea.
If I do a search for some of those log lines, I can see that others experience this same thing.
The text was updated successfully, but these errors were encountered: