-
Notifications
You must be signed in to change notification settings - Fork 507
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add kotlin-logging as logging framework #1327
Add kotlin-logging as logging framework #1327
Commits on Dec 28, 2021
-
Add kotlin-logging as logging framework
Refactor output written to stdout / stderr to log statements where applicable. The kotlin-logging framework uses SLF4J as underlying logging framework. The latter framework does not allow to change the desired log level to be changed at runtime. As ktlint supports the command line flag "--debug" to print additional logging, it was needed to add logback as underlying logging framework. The IndentationRule and the RuleExtension class both changed the logging behavior based on the environment variable KTLINT_DEBUG. This variable could be assigned multiple values. This variable is now split into two distinct variables KTLINT_UNIT_TEST_TRACE and KTLINT_UNIT_TEST_DUMP_AST which can either be set to "on" to enable TRACE resp. DUMP_AST functionality or anything else to disable it. End users of ktlint should use the new command line flag "--trace" resp. the existing "--print-ast". Solved a bug in DumpASTRule when retrieval of the linenumber results in a IndexOutOfBoundsException cause by an AST mutation resulting in an invalid offset. In RuleExtension improved the logic regarding dumping the AST. When invoked from the extension, the DumpASTRule print the output to STDOUT instead of STDERR. Following needs explicit attention while reviewing: * Check the way the Gradle dependencies are added. I have little knowledge of Gradle. * I was not able to find published checksums for the added dependencies, so I have added the Gradle generated keys
Paul Dingemans committedDec 28, 2021 Configuration menu - View commit details
-
Copy full SHA for 90d7e38 - Browse repository at this point
Copy the full SHA 90d7e38View commit details
Commits on Jan 23, 2022
-
Merge remote-tracking branch 'upstream/master' into 589-kotling-logging
# Conflicts: # gradle/verification-metadata.xml # ktlint-ruleset-standard/src/main/kotlin/com/pinterest/ktlint/ruleset/standard/IndentationRule.kt # ktlint/src/main/kotlin/com/pinterest/ktlint/Main.kt # ktlint/src/main/kotlin/com/pinterest/ktlint/internal/GitHookInstaller.kt # ktlint/src/main/kotlin/com/pinterest/ktlint/internal/PrintASTSubCommand.kt # ktlint/src/main/kotlin/com/pinterest/ktlint/internal/RuleSetsLoader.kt
Paul Dingemans committedJan 23, 2022 Configuration menu - View commit details
-
Copy full SHA for 4c3b1d5 - Browse repository at this point
Copy the full SHA 4c3b1d5View commit details -
Fix tests regarding warning when a provided JAR does not contain a ru…
…leset Note: The jar "ktlint-ruleset-experimental.jar" which previously was used as invalid jar in the unit test, was replaced in the master branch with a jar that actually does contain a ruleset provider. Now a new JAR (the "ktlint-reporter-html.jar") is added which does not contain a ruleset provider. Also the tests have been changed to check in the normal output for absence or existence of the warning.
Paul Dingemans committedJan 23, 2022 Configuration menu - View commit details
-
Copy full SHA for b8e0990 - Browse repository at this point
Copy the full SHA b8e0990View commit details -
Change log level of messages regarding which file is being processed …
…and what .editorconfig value are applicable from debug to trace Loglevel debug is enabled by the verbose mode which is commonly used on the CLI to detect which rule actually is throwing the lint error. This same flag is also used by the build step which checks the ktlint source code for violations. Due to way too many errors, it became too hard to find the files/lines which need to be changed.
Paul Dingemans committedJan 23, 2022 Configuration menu - View commit details
-
Copy full SHA for 37cd61e - Browse repository at this point
Copy the full SHA 37cd61eView commit details -
Fix lint violations after merge "master" into branch "589-kotling-log…
…ging"
Paul Dingemans committedJan 23, 2022 Configuration menu - View commit details
-
Copy full SHA for 0901c70 - Browse repository at this point
Copy the full SHA 0901c70View commit details
Commits on Jan 28, 2022
-
Merge remote-tracking branch 'upstream/master' into 589-kotling-logging
# Conflicts: # ktlint-test/src/main/kotlin/com/pinterest/ktlint/test/RuleExtension.kt
Paul Dingemans committedJan 28, 2022 Configuration menu - View commit details
-
Copy full SHA for d6d05b7 - Browse repository at this point
Copy the full SHA d6d05b7View commit details
Commits on Jan 29, 2022
-
Merge remote-tracking branch 'upstream/master' into 589-kotling-logging
Paul Dingemans committedJan 29, 2022 Configuration menu - View commit details
-
Copy full SHA for de594ed - Browse repository at this point
Copy the full SHA de594edView commit details