saveourtool / diktat

Strict coding standard for Kotlin and a custom set of rules for detecting code smells, code style issues and bugs
https://diktat.saveourtool.com
MIT License
537 stars 39 forks source link

Update Ktlint to v1 (major) #1729

Closed renovate[bot] closed 1 year ago

renovate[bot] commented 1 year ago

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
com.pinterest.ktlint:ktlint-cli-ruleset-core 0.49.1 -> 1.0.0 age adoption passing confidence
com.pinterest.ktlint:ktlint-logger 0.49.1 -> 1.0.0 age adoption passing confidence
com.pinterest.ktlint:ktlint-rule-engine 0.49.1 -> 1.0.0 age adoption passing confidence

⚠ Dependency Lookup Warnings ⚠

Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


Release Notes

pinterest/ktlint (com.pinterest.ktlint:ktlint-cli-ruleset-core) ### [`v1.0.0`](https://togithub.com/pinterest/ktlint/blob/HEAD/CHANGELOG.md#100---2023-09-05) [Compare Source](https://togithub.com/pinterest/ktlint/compare/0.50.0...1.0.0) ##### πŸ’” Breaking changes - Update and align Maven coordinates - [#​2195](https://togithub.com/pinterest/ktlint/pull/2195), by [@​paul-dingemans](https://togithub.com/paul-dingemans)\ Be sure to update Maven coordinates below, to get latest changes! | Old Maven coordinates | New Maven coordinates | |----------------------------------------------------|--------------------------------------------------------| | com.pinterest.ktlint | com.pinterest.ktlint.ktlint-cli | | com.pinterest.ktlint.ktlint-reporter-baseline | com.pinterest.ktlint.ktlint-cli-reporter-baseline | | com.pinterest.ktlint.ktlint-reporter-checkstyle | com.pinterest.ktlint.ktlint-cli-reporter-checkstyle | | com.pinterest.ktlint.ktlint-cli-reporter | com.pinterest.ktlint.ktlint-cli-reporter-core | | com.pinterest.ktlint.ktlint-reporter-format | com.pinterest.ktlint.ktlint-cli-reporter-format | | com.pinterest.ktlint.ktlint-reporter-html | com.pinterest.ktlint.ktlint-cli-reporter-html | | com.pinterest.ktlint.ktlint-reporter-json | com.pinterest.ktlint.ktlint-cli-reporter-json | | com.pinterest.ktlint.ktlint-reporter-plain | com.pinterest.ktlint.ktlint-cli-reporter-plain | | com.pinterest.ktlint.ktlint-reporter-plain-summary | com.pinterest.ktlint.ktlint-cli-reporter-plain-summary | | com.pinterest.ktlint.ktlint-reporter-sarif | com.pinterest.ktlint.ktlint-cli-reporter-sarif | - Add binary compatibility validator - [#​2131](https://togithub.com/pinterest/ktlint/pull/2131), by [@​mateuszkwiecinski](https://togithub.com/mateuszkwiecinski) - Replace kotlin public `data class`es with Poko compiler plugin generated ones - [#​2136](https://togithub.com/pinterest/ktlint/pull/2136), by [@​mateuszkwiecinski](https://togithub.com/mateuszkwiecinski)\ As a part of public API stabilization, data classes are no longer used in the public API. As of that, functions like `copy()` or `componentN()` (used for destructuring declarations) are not available anymore. - Promote experimental rules - [#​2218](https://togithub.com/pinterest/ktlint/pull/2218), by [@​paul-dingemans](https://togithub.com/paul-dingemans)\ The rules below have been promoted to non-experimental rules: - [blank-line-before-declaration](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#blank-line-before-declarations) - [context-receiver-wrapping](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#content-receiver-wrapping) - [discouraged-comment-location](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#discouraged-comment-location) - [enum-wrapping](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#enum-wrapping) - [function-naming](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#function-naming) - [function-signature](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#function-signature) - [if-else-bracing](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#if-else-bracing) - [multiline-expression-wrapping](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#multiline-expression-wrapping) - [if-else-wrapping](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#if-else-wrapping) - [no-blank-line-in-list](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#no-blank-line-in-list) - [no-consecutive-comments](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#no-consecutive-comments) - [no-empty-file](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#no-empty-file) - [no-empty-first-line-in-class-body](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#no-empty-first-line-in-class-body) - [no-single-line-block-comment](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#no-single-line-block-comment) - [parameter-list-spacing](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#parameter-list-spacing) - [property-naming](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#property-naming) - [statement-wrapping](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#statement-wrapping) - [string-template-indent](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#string-template-indent) - [try-catch-finally-spacing](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#try-catch-finally-spacing) - [type-argument-list-spacing](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#type-argument-list-spacing) - [type-parameter-list-spacing](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#type-parameter-list-spacing) - [unnecessary-parentheses-before-trailing-lambda](https://pinterest.github.io/ktlint/1.0.0/rules/standard/#unnecessary-parentheses-before-trailing-lambda) - Fix statement-wrapping and align rule classes - [#​2178](https://togithub.com/pinterest/ktlint/pull/2178), by [@​paul-dingemans](https://togithub.com/paul-dingemans)\ Rule class `MultilineExpressionWrapping` has been renamed to `MultilineExpressionWrappingRule`. Rule class `StatementWrapping` has been renamed to `StatementWrappingRule`. `RULE_ID` constants below are moved to a different Java class at compile time. Each rule provided by Ktlint is to be accompanied by a `RULE_ID` constant that can be used in the `VisitorModifier.RunAfter`. Filenames did not comply with standard that it should end with `Rule` suffix. | RULE ID | Old Java class name | New Java class name | |-----------------------------------------|-------------------------------|-----------------------------------| | `FUNCTION_EXPRESSION_BODY_RULE_ID` | FunctionExpressionBodyKt | FunctionExpressionBodyRuleKt | | `FUNCTION_LITERAL_RULE_ID` | FunctionLiteralKt | FunctionLiteralRuleKt | | `MULTILINE_EXPRESSION_WRAPPING_RULE_ID` | MultilineExpressionWrappingKt | MultilineExpressionWrappingRuleKt | | `NO_BLANK_LINE_IN_LIST_RULE_ID` | NoBlankLineInListKt | NoBlankLineInListRuleKt | | `NO_EMPTY_FILE_RULE_ID` | (not applicable) | NoEmptyFileRuleKt | - Update to Kotlin 1.9 & remove TreeCopyHandler extension - [#​2113](https://togithub.com/pinterest/ktlint/pull/2113), by [@​paul-dingemans](https://togithub.com/paul-dingemans)\ Class `org.jetbrains.kotlin.com.intellij.treeCopyHandler` is no longer registered as extension point for the compiler as this is not supported in Kotlin 1.9. Please test your custom rules. In case of unexpected exceptions during formatting of code, see [#​2044](https://togithub.com/pinterest/ktlint/pull/2044) for possible remediation. ##### πŸ†• Features - Change default code style to `ktlint_official` - [#​2144](https://togithub.com/pinterest/ktlint/pull/2144), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Add new experimental rule `class-signature` - [#​2119](https://togithub.com/pinterest/ktlint/pull/2119), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Add new experimental rule `function-expression-body` - [#​2151](https://togithub.com/pinterest/ktlint/pull/2151), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Add new experimental rule `chain-method-continuation` - [#​2088](https://togithub.com/pinterest/ktlint/pull/2088), by [@​atulgpt](https://togithub.com/atulgpt) - Add new experimental rule `function-literal` - [#​2137](https://togithub.com/pinterest/ktlint/pull/2137), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Add new experimental rule `function-type-modifier-spacing` rule - [#​2216](https://togithub.com/pinterest/ktlint/pull/2216), by [@​t-kameyama](https://togithub.com/t-kameyama) - Define `EditorConfigOverride` for dynamically loaded ruleset - [#​2194](https://togithub.com/pinterest/ktlint/pull/2194), by [@​paul-dingemans](https://togithub.com/paul-dingemans)\ The `EditorConfigOverride` parameter of the `KtlintRuleEngine` can be defined using the factory method `EditorConfigOverride.from(vararg properties: Pair, *>)`. This requires the `EditorConfigProperty`'s to be available at compile time. Some common `EditorConfigProperty`'s are defined in `ktlint-rule-engine-core` which is loaded as transitive dependency of `ktlint-rule-engine` and as of that are available at compile. If an `EditorConfigProperty` is defined in a `Rule` that is only provided via a runtime dependency, it gets a bit more complicated. The `ktlint-api-consumer` example has now been updated to show how the `EditorConfigProperty` can be retrieved from the `Rule`. - Move wrapping on semicolon from `wrapping` rule to `statement-wrapping` rule - [#​2222](https://togithub.com/pinterest/ktlint/pull/2222), by [@​paul-dingemans](https://togithub.com/paul-dingemans) ##### πŸ”§ Fixes - Do not indent class body for classes having a long super type list - [#​2116](https://togithub.com/pinterest/ktlint/pull/2116), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix indent of explicit constructor - [#​2118](https://togithub.com/pinterest/ktlint/pull/2118), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix incorrect formatting of nested function literal - [#​2107](https://togithub.com/pinterest/ktlint/pull/2107), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Add property to disable ktlint for a glob in `.editorconfig` - [#​2108](https://togithub.com/pinterest/ktlint/pull/2108), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix spacing around colon in annotations - [#​2126](https://togithub.com/pinterest/ktlint/pull/2126), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix solving problems in 3 consecutive runs - [#​2132](https://togithub.com/pinterest/ktlint/pull/2132), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix indent parenthesized expression - [#​2127](https://togithub.com/pinterest/ktlint/pull/2127), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix indent of IS_EXPRESSION, PREFIX_EXPRESSION and POSTFIX_EXPRESSION - [#​2125](https://togithub.com/pinterest/ktlint/pull/2125), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Do not wrap a binary expression after an elvis operator - [#​2134](https://togithub.com/pinterest/ktlint/pull/2134), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Drop obsolete class LintError in ktlint-api-consumer - [#​2145](https://togithub.com/pinterest/ktlint/pull/2145), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix null pointer exception for if-else statement with empty THEN block - [#​2142](https://togithub.com/pinterest/ktlint/pull/2142), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix false positive in property-naming - [#​2141](https://togithub.com/pinterest/ktlint/pull/2141), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Store relative path of file in baseline file - [#​2147](https://togithub.com/pinterest/ktlint/pull/2147), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix url of build status badge - [#​2162](https://togithub.com/pinterest/ktlint/pull/2162), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Update CONTRIBUTING.md - [#​2163](https://togithub.com/pinterest/ktlint/pull/2163), by [@​oshai](https://togithub.com/oshai) - Fix statement-wrapping and align rule classes - [#​2178](https://togithub.com/pinterest/ktlint/pull/2178), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix alignment of type constraints after `where` keyword in function - [#​2180](https://togithub.com/pinterest/ktlint/pull/2180), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix wrapping of multiline postfix expression - [#​2184](https://togithub.com/pinterest/ktlint/pull/2184), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Do not wrap expression after a spread operator - [#​2193](https://togithub.com/pinterest/ktlint/pull/2193), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Do not remove parenthesis after explicit class constructor without arguments - [#​2226](https://togithub.com/pinterest/ktlint/pull/2226), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix conflict between rules due to annotated super type call - [#​2227](https://togithub.com/pinterest/ktlint/pull/2227), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Fix indentation of super type list of class in case it is preceded by a comment - [#​2228](https://togithub.com/pinterest/ktlint/pull/2228), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Super type list starting with an annotation having a parameters - [#​2230](https://togithub.com/pinterest/ktlint/pull/2230), by [@​paul-dingemans](https://togithub.com/paul-dingemans) - Do not wrap values in a single line enum when it is preceded by a comment or an annotation - [#​2229](https://togithub.com/pinterest/ktlint/pull/2229), by [@​paul-dingemans](https://togithub.com/paul-dingemans) ##### πŸ“¦ Dependencies - Update dependency org.codehaus.janino:janino to v3.1.10 - [#​2110](https://togithub.com/pinterest/ktlint/pull/2110), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency com.google.jimfs:jimfs to v1.3.0 - [#​2112](https://togithub.com/pinterest/ktlint/pull/2112), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency org.junit.jupiter:junit-jupiter to v5.10.0 - [#​2148](https://togithub.com/pinterest/ktlint/pull/2148), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency io.github.oshai:kotlin-logging-jvm to v5.1.0 - [#​2174](https://togithub.com/pinterest/ktlint/pull/2174), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency dev.drewhamilton.poko:poko-gradle-plugin to v0.15.0 - [#​2173](https://togithub.com/pinterest/ktlint/pull/2173), by [@​renovate](https://togithub.com/renovate)\[bot] - Update plugin org.gradle.toolchains.foojay-resolver-convention to v0.7.0 - [#​2187](https://togithub.com/pinterest/ktlint/pull/2187), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency gradle to v8.3 - [#​2186](https://togithub.com/pinterest/ktlint/pull/2186), by [@​renovate](https://togithub.com/renovate)\[bot] - Update kotlin monorepo to v1.9.10 - [#​2197](https://togithub.com/pinterest/ktlint/pull/2197), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency info.picocli:picocli to v4.7.5 - [#​2215](https://togithub.com/pinterest/ktlint/pull/2215), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v1.9.0 - [#​2221](https://togithub.com/pinterest/ktlint/pull/2221), by [@​renovate](https://togithub.com/renovate)\[bot] - Update dependency org.slf4j:slf4j-simple to v2.0.9 - [#​2224](https://togithub.com/pinterest/ktlint/pull/2224), by [@​renovate](https://togithub.com/renovate)\[bot] ##### πŸ’¬ Other - Setup toolchains, compile project with Java 20 only, run test on various Java versions - [#​2120](https://togithub.com/pinterest/ktlint/pull/2120), by [@​mateuszkwiecinski](https://togithub.com/mateuszkwiecinski) - Add release-changelog-builder-action to temporary workflow - [#​2196](https://togithub.com/pinterest/ktlint/pull/2196), by [@​paul-dingemans](https://togithub.com/paul-dingemans) ### [`v0.50.0`](https://togithub.com/pinterest/ktlint/blob/HEAD/CHANGELOG.md#0500---2023-06-29) [Compare Source](https://togithub.com/pinterest/ktlint/compare/0.49.1...0.50.0) ##### Deprecation of ktlint-enable and ktlint-disable directives The `ktlint-disable` and `ktlint-enable` directives are no longer supported. Ktlint rules can now only be suppressed using the `@Suppress` or `@SuppressWarnings` annotations. A new rule, `internal:ktlint-suppression`, is provided to replace the directives with annotations. API consumers do not need to provide this rule, but it does no harm when done. The `internal:ktlint-suppression` rule can not be disabled via the `.editorconfig` nor via `@Suppress` or `@SuppressWarnings` annotations. ##### Custom Rule Providers need to prepare for Kotlin 1.9 In Kotlin 1.9 the extension points of the embedded kotlin compiler will change. Ktlint only uses the `org.jetbrains.kotlin.com.intellij.treeCopyHandler` extension point. This extension is not yet supported in 1.9, neither is it documented ([#KT-58704](https://youtrack.jetbrains.com/issue/KT-58704/Support-and-document-extension-point-org.jetbrains.kotlin.com.intellij.treeCopyHandler)). Without this extension point it might happen that your custom rules will throw exceptions during runtime. See [#​1981](https://togithub.com/pinterest/ktlint/issues/1981). In Ktlint, 7 out of 77 rules needed small and sometimes bigger changes to become independent of the extension point `org.jetbrains.kotlin.com.intellij.treeCopyHandler`. The impact on your custom rules may vary dependent on the way the autocorrect has been implemented. When manipulating `ASTNode`s there seems to be no impact. When, manipulating `PsiElement`s, some functions consistently result in a runtime exception. Based on the refactoring of the rules as provided by `ktlint-ruleset-standard` in Ktlint `0.49.x` the suggested refactoring is as follows: - Replace `LeafElement.replaceWithText(String)` with `LeafElement.rawReplaceWithText(String)`. - Replace `PsiElement.addAfter(PsiElement, PsiElement)` with `AstNode.addChild(AstNode, AstNode)`. Note that this method inserts the new node (first) argument *before* the second argument node and as of that is not a simple replacement of the `PsiElement.addAfter(PsiElement, PsiElement)`. - Replace `PsiElement.replace(PsiElement)` with a sequence of `AstNode.addChild(AstNode, AstNode)` and `AstNode.removeChild(AstNode)`. Be aware that your custom rules might use other functions which also throw exceptions when the extension point `org.jetbrains.kotlin.com.intellij.treeCopyHandler` is no longer supported. In order to help you to analyse and fix the problems with your custom rules, ktlint temporarily supports to disable the extension point `org.jetbrains.kotlin.com.intellij.treeCopyHandler` using a flag. This flag is available in the Ktlint CLI and in the `KtlintRuleEngine`. By default, the extension point is enabled like it was in previous versions of ktlint. At least you should analyse the problems by running your test suits by running ktlint and disabling the extension point. Next you can start with fixing and releasing the updated rules. All rules in this version of ktlint have already been refactored and are not dependent on the extension point anymore. In Ktlint CLI the flag is to be activated with parameter `--disable-kotlin-extension-point`. API Consumers that use the `KtlintRuleEngine` directly, have to set property `enableKotlinCompilerExtensionPoint` to `false`. At this point in time, it is not yet decided what the next steps will be. Ktlint might drop the support of the extension points entirely. Or, if the extension point `org.jetbrains.kotlin.com.intellij.treeCopyHandler` is fully supported at the time that ktlint will be based on kotlin 1.9 it might be kept. In either case, the flag will be dropped in a next version of ktlint. ##### Added - Add new experimental rule `binary-expression-wrapping`. This rule wraps a binary expression in case the max line length is exceeded ([#​1940](https://togithub.com/pinterest/ktlint/issues/1940)) - Add flag to disable extension point `org.jetbrains.kotlin.com.intellij.treeCopyHandler` to analyse impact on custom rules [#​1981](https://togithub.com/pinterest/ktlint/issues/1981) - Add new experimental rule `no-empty-file` for all code styles. A kotlin (script) file may not be empty ([#​1074](https://togithub.com/pinterest/ktlint/issues/1074)) - Add new experimental rule `statement-wrapping` which ensures function, class, or other blocks statement body doesn't start or end at starting or ending braces of the block ([#​1938](https://togithub.com/pinterest/ktlint/issues/1938)). Note, although this rule is added in this release, it is never executed except in unit tests. - Add new experimental rule `blank-line-before-declaration`. This rule requires a blank line before class, function or property declarations ([#​1939](https://togithub.com/pinterest/ktlint/issues/1939)) - Wrap multiple statements on same line `wrapping` ([#​1078](https://togithub.com/pinterest/ktlint/issues/1078)) - Add new rule `ktlint-suppression` to replace the `ktlint-disable` and `ktlint-enable` directives with annotations. This rule can not be disabled via the `.editorconfig` ([#​1947](https://togithub.com/pinterest/ktlint/issues/1947)) - Inform user about using `--format` option of KtLint CLI when finding a violation that can be autocorrected ([#​1071](https://togithub.com/pinterest/ktlint/issues/1071)) ##### Removed - Code which was deprecated in `0.49.x` is removed. Consult changelog of 0.49.x\` released for more information. Summary of removed code: ##### Fixed - Do not flag a (potential) mutable extension property in case the getter is annotated or prefixed with a modifier `property-naming` ([#​2024](https://togithub.com/pinterest/ktlint/issues/2024)) - Do not merge an annotated expression body with the function signature even if it fits on a single line ([#​2043](https://togithub.com/pinterest/ktlint/issues/2043)) - Ignore property with name `serialVersionUID` in `property-naming` ([#​2045](https://togithub.com/pinterest/ktlint/issues/2045)) - Prevent incorrect reporting of violations in case a nullable function type reference exceeds the maximum line length `parameter-list-wrapping` ([#​1324](https://togithub.com/pinterest/ktlint/issues/1324)) - Prevent false negative on `else` branch when body contains only chained calls or binary expression ([#​2057](https://togithub.com/pinterest/ktlint/issues/2057)) - Fix indent when property value is wrapped to next line ([#​2095](https://togithub.com/pinterest/ktlint/issues/2095)) ##### Changed - Fix Java interoperability issues with `RuleId` and `RuleSetId` classes. Those classes were defined as value classes in `0.49.0` and `0.49.1`. Although the classes were marked with `@JvmInline` it seems that it is not possible to uses those classes from Java base API Consumers like Spotless. The classes have now been replaced with data classes ([#​2041](https://togithub.com/pinterest/ktlint/issues/2041)) - Update dependency `info.picocli:picocli` to `v4.7.4` - Update dependency `org.junit.jupiter:junit-jupiter` to `v5.9.3` - Update Kotlin development version to `1.8.22` and Kotlin version to `1.8.22`. - Update dependency `io.github.detekt.sarif4k:sarif4k` to `v0.4.0` - Update dependency `org.jetbrains.dokka:dokka-gradle-plugin` to `v1.8.20` - Run format up to 3 times in case formatting introduces changes which also can be autocorrected ([#​2084](https://togithub.com/pinterest/ktlint/issues/2084))

Configuration

πŸ“… Schedule: Branch creation - "before 4am on Monday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

β™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

πŸ”• Ignore: Close this PR and you won't be reminded about these updates again.



This PR has been generated by Mend Renovate. View repository job log here.

renovate[bot] commented 1 year ago

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠ Warning: custom changes will be lost.

codecov[bot] commented 1 year ago

Codecov Report

Merging #1729 (5579d78) into master (84e380d) will decrease coverage by 3.46%. The diff coverage is 12.90%.

@@             Coverage Diff              @@
##             master    #1729      +/-   ##
============================================
- Coverage     78.21%   74.76%   -3.46%     
+ Complexity     2324     2270      -54     
============================================
  Files           126      126              
  Lines          8223     8230       +7     
  Branches       2073     2072       -1     
============================================
- Hits           6432     6153     -279     
- Misses          876     1163     +287     
+ Partials        915      914       -1     
Files Changed Coverage Ξ”
...c/main/kotlin/com/saveourtool/diktat/DiktatMain.kt 0.00% <ΓΈ> (ΓΈ)
...iktat/common/config/reader/AbstractConfigReader.kt 66.66% <0.00%> (-8.34%) :arrow_down:
...ktat/common/config/reader/ApplicationProperties.kt 0.00% <0.00%> (ΓΈ)
...ol/diktat/common/config/rules/RulesConfigReader.kt 34.14% <0.00%> (ΓΈ)
...com/saveourtool/diktat/ruleset/rules/DiktatRule.kt 62.50% <0.00%> (-2.72%) :arrow_down:
...at/ruleset/rules/chapter2/comments/CommentsRule.kt 87.64% <0.00%> (-1.00%) :arrow_down:
.../ruleset/rules/chapter2/kdoc/CommentsFormatting.kt 52.97% <0.00%> (-18.46%) :arrow_down:
...diktat/ruleset/rules/chapter3/TrailingCommaRule.kt 74.07% <0.00%> (-18.38%) :arrow_down:
...iktat/ruleset/rules/chapter3/files/NewlinesRule.kt 81.86% <0.00%> (ΓΈ)
...tat/ruleset/rules/chapter3/files/WhiteSpaceRule.kt 77.99% <0.00%> (ΓΈ)
... and 6 more

... and 9 files with indirect coverage changes

github-actions[bot] commented 1 year ago

JUnit Tests (macOS, EnricoMi/publish-unit-test-result-action@v2)

βŸβ€„β€ˆ164 files  Β±0β€‚β€ƒβŸβ€„β€ˆ164 suites  Β±0   5m 32s :stopwatch: +8s 1β€ˆ377 tests Β±0  1β€ˆ308 :heavy_check_mark:  -β€Š33  69 :zzz: +33  0 :x: Β±0  2β€ˆ756 runs  Β±0  2β€ˆ686 :heavy_check_mark:  -β€Š34  70 :zzz: +34  0 :x: Β±0 

Results for commit 5579d788. ± Comparison against base commit 84e380d4.

This pull request skips 33 tests. ``` com.saveourtool.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect class name fix() com.saveourtool.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect object name fix() com.saveourtool.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect variable name case fix() com.saveourtool.diktat.ruleset.chapter2.CommentsFormattingFixTest ‑ check lines and spaces in comments() com.saveourtool.diktat.ruleset.chapter2.KdocCommentsFixTest ‑ check fix without class kdoc() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsFixTest ‑ @param tag should be added to existing KDoc() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsFixTest ‑ @throws tag should be added to existing KDoc() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsFixTest ‑ KdocMethods rule should reformat code (full example)() com.saveourtool.diktat.ruleset.chapter3.BracesRuleFixTest ‑ should add braces to do-while loops with empty body() com.saveourtool.diktat.ruleset.chapter3.BracesRuleFixTest ‑ should add braces to if-else statements - 1() … ```

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 1 year ago

JUnit Tests (Windows, EnricoMi/publish-unit-test-result-action@v2)

βŸβ€„β€ˆ164 files  Β±0β€‚β€ƒβŸβ€„β€ˆ164 suites  Β±0   5m 15s :stopwatch: - 1m 33s 1β€ˆ377 tests Β±0  1β€ˆ320 :heavy_check_mark:  -β€Š40  57 :zzz: +40  0 :x: Β±0  2β€ˆ756 runs  Β±0  2β€ˆ698 :heavy_check_mark:  -β€Š41  58 :zzz: +41  0 :x: Β±0 

Results for commit 5579d788. ± Comparison against base commit 84e380d4.

This pull request skips 40 tests. ``` com.saveourtool.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect class name fix() com.saveourtool.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect object name fix() com.saveourtool.diktat.ruleset.chapter1.IdentifierNamingFixTest ‑ incorrect variable name case fix() com.saveourtool.diktat.ruleset.chapter2.CommentsFormattingFixTest ‑ check lines and spaces in comments() com.saveourtool.diktat.ruleset.chapter2.KdocCommentsFixTest ‑ check fix without class kdoc() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsFixTest ‑ @param tag should be added to existing KDoc() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsFixTest ‑ @throws tag should be added to existing KDoc() com.saveourtool.diktat.ruleset.chapter2.KdocMethodsFixTest ‑ KdocMethods rule should reformat code (full example)() com.saveourtool.diktat.ruleset.chapter3.BracesRuleFixTest ‑ should add braces to do-while loops with empty body() com.saveourtool.diktat.ruleset.chapter3.BracesRuleFixTest ‑ should add braces to if-else statements - 1() … ```

:recycle: This comment has been updated with latest results.