Closed languitar closed 1 year ago
The ktlint output parsing used to feed files to fix into ktlint includes some non-file output from ktlint that is then feed into the autofix CLI call:
$ /home/johannes/.cache/pre-commit/repojigxkeve/py_env-python3.10/bin/python /home/johannes/.cache/pre-commit/repojigxkeve/py_env-python3.10/bin/pretty-format-kotlin --ktlint-version=0.49.0 --autofix path/TheFile.kt [cwd=/home/johannes/src/somewhere] Run command: ('java', '-version') [return_code=0] | Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel openjdk version "11.0.19" 2023-04-18 OpenJDK Runtime Environment (build 11.0.19+0-suse-1.1-x8664) OpenJDK 64-Bit Server VM (build 11.0.19+0-suse-1.1-x8664, mixed mode) [cwd=/home/johannes/src/somewhere] Run command: ('java', '--add-opens', 'java.base/java.lang=ALL-UNNAMED', '-jar', '/home/johannes/.cache/pre-commit/ktlint0.49.0.jar', '--log-level', 'debug', '--relative', '--', 'path/TheFile.kt') [return_code=1] | Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel 10:10:47.235 [main] DEBUG com.pinterest.ktlint.cli.internal.KtlintServiceLoader - Discovered RuleSetProviderV3 with id 'standard' in ktlint JAR 10:10:47.352 [main] DEBUG com.pinterest.ktlint.cli.internal.KtlintServiceLoader - Discovered ReporterProviderV2 with id 'baseline' in ktlint JAR 10:10:47.352 [main] DEBUG com.pinterest.ktlint.cli.internal.KtlintServiceLoader - Discovered ReporterProviderV2 with id 'plain' in ktlint JAR ... 10:10:47.740 [pool-1-thread-1] DEBUG com.pinterest.ktlint.rule.engine.api.KtLintRuleEngine - Finished with linting file 'TheFile.kt' path/TheFile.kt:48:1: Unexpected indentation (10) (should be 8) (standard:indent) Summary error count (descending) by rule: standard:indent: 1 10:10:47.743 [main] DEBUG com.pinterest.ktlint.cli.internal.KtlintCommandLine - Finished processing in 515ms / 1 file(s) scanned / 1 error(s) found 10:10:47.744 [main] DEBUG com.pinterest.ktlint.cli.internal.KtlintCommandLine - Exit ktlint with exit code: 1 Running ktlint format on {'', 'path/TheFile.kt', 'Summary error count (descending) by rule', '10', 'Picked up _JAVA_OPTIONS', '\t', ' - standard', ' standard'} [cwd=/home/johannes/src/somewhere] Run command: ('java', '--add-opens', 'java.base/java.lang=ALL-UNNAMED', '-jar', '/home/johannes/.cache/pre-commit/ktlint0.49.0.jar', '--log-level', 'debug', '--relative', '--format', '--', '', 'path/TheFile.kt', 'Summary error count (descending) by rule', '10', 'Picked up _JAVA_OPTIONS', '\t', ' - standard', ' standard')
The following shows, that some other output on stdout/stderr got picked up:
Running ktlint format on {'', 'path/TheFile.kt', 'Summary error count (descending) by rule', '10', 'Picked up _JAVA_OPTIONS', '\t', ' - standard', ' standard'}
The ktlint output parsing used to feed files to fix into ktlint includes some non-file output from ktlint that is then feed into the autofix CLI call:
The following shows, that some other output on stdout/stderr got picked up: