aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
6 daysFix `Function naming` rule code example (#2668)upstream-masterKawahara Shotaro
Co-authored-by: TBSten <TBSten@users.noreply.github.com>
9 daysFix `blank line before declarations` rule code example (#2657)Kawahara Shotaro
Co-authored-by: Paul Dingemans <paul-dingemans@users.noreply.github.com>
2024-05-12Fix check for spacing around operator for binary operators inside unary ↵Chiang Fong Lee
expression (#2653) For example an expression wrapped in `!(<some-binary-expression>)` should check/fix spacing around the operator in the inner binary expression. Fixes #2652
2024-05-12Update plugin com.gradle.develocity to v3.17.3 (#2654)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-08Update kotlin monorepo to v1.9.24 (#2649)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-30Update dependency com.github.ajalt.clikt:clikt to v4.4.0 (#2647)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-27Handle trailing space on preceding line in call to ↵Paul Dingemans
`lineLengthWithoutNewlinePrefix` (#2644)
2024-04-27Fix documentation for getRuleProviders. (#2645)Hayato Kihara
2024-04-26Update actions/checkout digest to 0ad4b8f (#2646)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-23Improve documentation about prevent conflicts with Intellij IDEA formatting ↵Paul Dingemans
(#2642) Closes #2639
2024-04-23Support partial formatting (range) in given codePaul Dingemans
Allows API consumers like the 'ktlint-intellij-plugin' to format a block of code inside the given code (for example a file) without autocorrect the given code entirely. The start offset of the node on which a rule can detect a lint violation should be inside the range which is to be formatted. This has some unexpected side effects for some rules. In most cases it is to be expected that the user won't notice those side effects. And if it happens, the most likely way the user responds is widening the range which is to be formatted, and try to format again. For example, the given code might contain the when-statement below: ``` // code with lint violations when(foobar) { FOO -> "Single line" BAR -> """ Multi line """.trimIndent() else -> null } // more code with lint violations ``` The `blank-line-between-when-conditions` rule requires blank lines to be added between the conditions. If the when-keyword above is included in the range which is to be formatted then the blank lines before the conditions are added. If only the when-conditions itself are selected, but not the when-keyword, then the blank lines are not added. This unexpected behavior is a side effect of the way the partial formatting is implemented currently. The side effects can be prevented by delaying the decision to autocorrect as late as possible and the exact offset of the error is known. This however would cause a breaking change, and needs to wait until Ktlint V2.x. Closes #2629
2024-04-23Suppress `property-name` rule for `ObjectPropertyName` or ↵Paul Dingemans
`PrivatePropertyName` (#2643) When Intellij IDEA suppressions `ObjectPropertyName` or `PrivatePropertyName` are used, then also suppress ktlint `property-naming` rule. Closes #2612
2024-04-23Update actions/checkout digest to 1d96c77 (#2640)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22Fix typo's (#2641)Paul Dingemans
Command used: ``` codespell --skip="**/build/*" --ignore-words-list afterall,testng,optin --write-changes ``` See https://pypi.org/project/codespell/
2024-04-17Update plugin com.gradle.develocity to v3.17.2 (#2638)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-16Fix unwanted whitespace between super class constructor and its argument ↵Phil Davies
list (#2630) Co-authored-by: Paul Dingemans <paul-dingemans@users.noreply.github.com>
2024-04-16Update dependency io.github.oshai:kotlin-logging-jvm to v6.0.9 (#2634)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-16Update gradle/wrapper-validation-action action to v3 (#2633)renovate[bot]
* Update gradle/wrapper-validation-action action to v3 * Replace gradle/wrapper-validation-action@v3 with gradle/actions/wrapper-validation@v3 https://github.com/gradle/wrapper-validation-action/releases/tag/v3.3.0 Co-authored-by: Zongle Wang <wangzongler@gmail.com> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Paul Dingemans <paul-dingemans@users.noreply.github.com> Co-authored-by: Zongle Wang <wangzongler@gmail.com>
2024-04-16Update dependency org.slf4j:slf4j-simple to v2.0.13 (#2632)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-10Update plugin com.gradle.develocity to v3.17.1 (#2628)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-06Fix replace of redundant curly braces (#2617)Paul Dingemans
Due to incorrect construction of the string template, it could happen that an import is removed as it was falsely flagged as unused as the "$" was added as prefix in the identifier.
2024-04-06Update dependency io.github.oshai:kotlin-logging-jvm to v6.0.4 (#2626)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-06Migrate to develocity plugin (#2625)Zongle Wang
https://docs.gradle.com/enterprise/gradle-plugin/legacy/#develocity_migration
2024-04-06Set and reset Locale to pass test for non-english contributor. (#2622)Jaehwa Noh
Fixes #2621 Co-authored-by: Paul Dingemans <paul-dingemans@users.noreply.github.com>
2024-03-31Update dependency com.github.ajalt.clikt:clikt to v4.3.0 (#2618)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-23Update dependency gradle to v8.7 (#2616)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-17Update softprops/action-gh-release action to v2 (#2600)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-17Prevent exception in `binary-expression-wrapping` rule in case it is ↵Paul Dingemans
preceded on the same line by a block comment containing a newline character (#2607) Function `leavesOnLine` calls function `getFirstLeafOnLineOrSelf` which finds the first leaf on the line by looking for newline character. A block comment containing a newline character resulted in considering that block comment to be the first element on the line, even in case it was preceded by other elements on the same line. Due to this change, the `max-line-length` rule failed, which has been resolved by refactoring the calculation of the line length. Closes #2601
2024-03-17Ignore nested reference expressions in `chain-method-continuation` (#2606)Paul Dingemans
Closes #2602
2024-03-17Ignore max line length in case the line contains only a string template ↵Paul Dingemans
followed by a comma (#2598) Closes #2597
2024-03-15Do not merge opening quotes of multiline string template with (single line) ↵Paul Dingemans
function signature (#2609) Closes #2592
2024-03-12Update dependency io.github.detekt.sarif4k:sarif4k to v0.6.0 (#2605)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-07Update kotlin monorepo to v1.9.23 (#2595)renovate[bot]
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-03-07Do not wrap operation reference after multiline string template (#2591)Paul Dingemans
Closes #2577
2024-03-07Merge pull request #2596 from pinterest/2594-documentationPaul Dingemans
Fix reference in documentation
2024-03-07Fix reference in documentationPaul Dingemans
Closes #2594
2024-03-05Merge pull request #2590 from ↵Paul Dingemans
pinterest/renovate/org.jetbrains.dokka-dokka-gradle-plugin-1.x Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v1.9.20
2024-03-04Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v1.9.20renovate[bot]
2024-02-29Merge pull request #2585 from pinterest/1.2.1-finishPaul Dingemans
Finish 1.2.1 release
2024-02-29Finish 1.2.1 releasePaul Dingemans
2024-02-29Merge pull request #2584 from pinterest/1.2.1-update-refsPaul Dingemans
Updated refs to latest (1.2.1) release
2024-02-29Updated refs to latest (1.2.1) releaseKtlint Release Workflow
2024-02-29Merge pull request #2583 from pinterest/1.2.1-prepPaul Dingemans
Prepare 1.2.1 release
2024-02-29Prepare 1.2.1 releasePaul Dingemans
2024-02-29Merge pull request #2582 from pinterest/master-fix-mergePaul Dingemans
Add missing import
2024-02-29Add missing importPaul Dingemans
2024-02-29Merge pull request #2581 from pinterest/2576-reporterPaul Dingemans
2576 reporter
2024-02-29Merge pull request #2580 from pinterest/2578-patterns-from-stdinPaul Dingemans
Fix null byte as default value for "--pattern-from-stdin"
2024-02-29Mark new rules as experimental (#2579)Paul Dingemans
* Mark new rules as experimental Closes #2575
2024-02-29Fix handling of "--reporter" CLI parameterPaul Dingemans
Closes #2576