Update dependency com.pinterest.ktlint:ktlint-rule-engine to v1 #1076
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.50.0
->1.2.1
Release Notes
pinterest/ktlint (com.pinterest.ktlint:ktlint-rule-engine)
v1.2.1
Compare Source
🆕 Features
None
🔧 Fixes
v1.2.0
Compare Source
🆕 Features
Break dependency between string-template-indent and multiline-expression-wrapping - #2505, by @paul-dingemans
Allow string template to exceed max line length when it is the only element on a line - #2480, by @paul-dingemans
Add configuration setting for ignoring
argument-list-wrapping
above treshold of argument - #2481, by @paul-dingemansNOTE: In code style
ktlint_official
this threshold isunset
so that arguments are always wrapped. If this impacts your code too much, you can make it backward compatible by setting.editorconfig
propertyktlint_argument_list_wrapping_ignore_when_parameter_count_greater_or_equal_than
to value8
. For other code styles this property is initialized with value8
and as of that backward compatible by default.Ignore EOL comment that causes max_line_length to be exceeded, except in max-line-length rule - #2516, by @paul-dingemans
Add new rule for disallowing KDoc at non-whitelisted locations - #2548, by @paul-dingemans
Improve insert of suppression - #2546, by @paul-dingemans
Ignore modifier of backing property in
android_studio
code style - #2552, by @paul-dingemansAdd rule to check spacing around square brackets 'square-brackets-spacing' - #2555, by @paul-dingemans
Add rule
blank-line-between-when-conditions
- #2564, by @paul-dingemans🔧 Fixes
Prevent IllegalArgumentException in
argument-list-wrapping
rule - #2500, by @paul-dingemansIgnore function which is returned as result in a function body - #2526, by @paul-dingemans
Fix false positive newline expected before comment in enum - #2527, by @paul-dingemans
Report violation when parameter list is preceded by a comment - #2541, by @paul-dingemans
Ignore EOL comments in
value-argument-comment
andvalue-parameter-comment
- #2551, by @paul-dingemansDo not indent string template starting at first position of line - #2553, by @paul-dingemans
Prevent conflict when curly closing brace is followed by range (until) operator - #2554, by @paul-dingemans
Run argument-list-wrapping after function-signature - #2568, by @paul-dingemans
Ignore simple reference expressions in
chain-method-continuation
- #2569, by @paul-dingemans📦 Dependencies
chore(deps): update plugin org.gradle.toolchains.foojay-resolver-convention to v0.8.0 - #2503, by @renovate[bot]
fix(deps): update dependency io.github.oshai:kotlin-logging-jvm to v6 - #2440, by @renovate[bot]
Replace gradle/gradle-build-action@v3 with gradle/actions/setup-gradle@v3 - #2518, by @paul-dingemans
chore(deps): update plugin kotlinx-binary-compatibiltiy-validator to v0.14.0 - #2522, by @renovate[bot]
chore(deps): update gradle/wrapper-validation-action action to v2 - #2523, by @renovate[bot]
chore(deps): update ffurrer2/extract-release-notes action to v2 - #2515, by @renovate[bot]
chore(deps): update dependency gradle to v8.6 - #2531, by @renovate[bot]
fix(deps): update dependency org.assertj:assertj-core to v3.25.3 - #2536, by @renovate[bot]
fix(deps): update dependency org.junit.jupiter:junit-jupiter to v5.10.2 - #2534, by @renovate[bot]
fix(deps): update dependency org.slf4j:slf4j-simple to v2.0.12 - #2538, by @renovate[bot]
fix(deps): update dependency org.codehaus.janino:janino to v3.1.12 - #2559, by @renovate[bot]
💬 Other
Simplify BOM exclude list - #2476, by @Goooler
2550 clikt - #2556, by @paul-dingemans
v1.1.1
Compare Source
🆕 Features
None
🔧 Fixes
Fix incorrect generateEditorConfig example in documentation - #2444, by @stay7
Fix insert of suppression on binary expression - #2463, by @paul-dingemans
Loosen dependency between chain-method-continuation and argument-list-wrapping - #2468, by @paul-dingemans
Keep arrow when both parameter list and block of function literal are empty - #2469, by @paul-dingemans
Improve wrapping of binary expressions - #2479, by @paul-dingemans
Resolve conflict between parameter-list-spacing and parameter-list-wrapping - #2491, by @paul-dingemans
Do not wrap binary expression value argument if it is already preceded by a newline - #2493, by @paul-dingemans
Fix operator spacing - #2473, by @paul-dingemans
Run
argument-list-wrapping
,class-signature
andfunction-signature
when comment rules are disabled - #2466, by @paul-dingemans📦 Dependencies
fix(deps): update kotlin monorepo to v1.9.22 - #2456, by @renovate[bot]
chore(deps): update actions/setup-python action to v5 - #2417, by @renovate[bot]
fix(deps): update dependency org.slf4j:slf4j-simple to v2.0.10 - #2470, by @renovate[bot]
fix(deps): update dependency dev.drewhamilton.poko:poko-gradle-plugin to v0.15.2 - #2485, by @renovate[bot]
fix(deps): update dependency org.assertj:assertj-core to v3.25.1 - #2486, by @renovate[bot]
v1.1.0
Compare Source
🆕 Features
Compile with java 21 instead of 20 - #2320, by @paul-dingemans
Improve checking on backing property - #2346, by @paul-dingemans
Add multiline-loop to complement multiline-if-else - #2298, by @hendraanggrian
Add "UnusedImport" as @Suppress alias - #2357, by @paul-dingemans
Allow backing property to be correlated to a public function - #2356, by @paul-dingemans
Add helper function 'fromSnippetWithPath' to create a Code instance - #2359, by @paul-dingemans
Support logging and exception throwing when loading baseline - #2362, by @paul-dingemans
Allow factory methods to use generics, and to overload other factory … - #2366, by @paul-dingemans
Remove dependencies on discouraged-comment-location rule - #2371, by @paul-dingemans
Ignore imports for
rangeUntil
inno-unused-imports
rule - #2376, by @paul-dingemansIgnore imports for
assign
inno-unused-imports
rule - #2382, by @paul-dingemansIgnore invalid function names when importing from "junit.framework" - #2386, by @paul-dingemans
Add experimental rules
condition-wrapping
andmixed-condition-operators
- #2401, by @paul-dingemansAllow property, function and class name to be same as keyword wrapped with backticks - #2405, by @paul-dingemans
Set offset of
max-line-length
violation to the last position at which a newline can be inserted to fix the violation - #2419, by @paul-dingemansAdd support for API Consumers to add suppressions - #2428, by @paul-dingemans
Disallow
else-if (..) <statement>
as single line construct - #2430, by @paul-dingemansAllow empty constructor for expected class declaration - #2431, by @paul-dingemans
Disallow comments in try-catch-finally at unexpected locations - #2432, by @paul-dingemans
Make ktlint.bat more environment agnostic - #2421, by @TWiStErRob
Suppress property-naming rule via
@Suppress("ConstPropertyName")
- #2442, by @paul-dingemans🔧 Fixes
Remove obsolete configuration files - #2321, by @paul-dingemans
De-indent the closing angle bracket of the type argument list and type parameter lists in ktlint_official code style - #2302, by @paul-dingemans
docs: Fix artifact url of Maven Central Badge - #2327, by @guicamest
Remove redundant arrow in function literal without parameters / fix documentation - #2365, by @paul-dingemans
Move curly brace before all consecutive comments preceding that curly brace - #2375, by @paul-dingemans
Prevent stack overflow exception when code provided via stdin can not be parsed as Kotlin, nor Kotlin script - #2380, by @paul-dingemans
Fix searching from inside a hidden directory - #2377, by @kitterion
Prevent unwanted joining of KDoc with preceding type-parameter-list - #2381, by @paul-dingemans
Fix false positive violation in
annotation
rule - #2400, by @paul-dingemansReplace all function bodies with body expressions in a single run - #2395, by @paul-dingemans
Fix offset for violation when final newline is missing - #2407, by @paul-dingemans
Fix path to ktlint JAR file in
ktlint.bat
- #2408, by @paul-dingemansSimplify
max-line-length
implementation - #2410, by @paul-dingemansRemove deprecated cli parameters
--experimental
,--code-style
,--disabled-rules
- #2411, by @paul-dingemansFix adding blank line between declaration and an annotated declaration which is preceded by comment - #2429, by @paul-dingemans
Update CODE_OF_CONDUCT with correct path - #2437, by @OriginalMHV
📦 Dependencies
fix(deps): update dependency org.jetbrains.dokka:dokka-gradle-plugin to v1.9.10 - #2323, by @renovate[bot]
fix(deps): update dependency org.junit.jupiter:junit-jupiter to v5.10.1 - #2342, by @renovate[bot]
fix(deps): update kotlin monorepo to v1.9.21 - #2374, by @renovate[bot]
fix(deps): update dependency org.codehaus.janino:janino to v3.1.11 - #2387, by @renovate[bot]
fix(deps): update dependency dev.drewhamilton.poko:poko-gradle-plugin to v0.15.1 - #2389, by @renovate[bot]
chore(deps): update dependency gradle to v8.5 - #2392, by @renovate[bot]
chore(deps): update actions/checkout digest to
b4ffde6
- #2329, by @renovate[bot]chore(deps): update actions/setup-java action to v4 - #2393, by @renovate[bot]
fix(deps): update dependency ch.qos.logback:logback-classic to v1.3.14 - #2406, by @renovate[bot]
fix(deps): update dependency io.github.hakky54:logcaptor to v2.9.2 - #2409, by @renovate[bot]
fix(deps): update dependency io.github.oshai:kotlin-logging-jvm to v5.1.4 - #2439, by @renovate[bot]
v1.0.1
Compare Source
🆕 Features
.editorconfig
propertyktlint_function_naming_ignore_when_annotated_with
so that rulefunction-naming
can be ignored based on annotations on that rule. See function-naming.🔧 Fixes
Update badge for Maven Central - #2245, by @Goooler
Fix code style parameter in cli - #2241, by @paul-dingemans
Anonymous function in assignment - #2263, by @paul-dingemans
Fix indent of multiline object declaration inside class - #2266, by @paul-dingemans
Do not replace function body with multiple exit points - #2273, by @paul-dingemans
Ignore override of function in rule
function-naming
- #2274, by @paul-dingemansSuppress
function-naming
based on annotations - #2275, by @paul-dingemansForce blank line before object declaration - #2287, by @paul-dingemans
Multiline expression wrapping - #2290, by @paul-dingemans
Ignore function naming in Kotest classes - #2291, by @paul-dingemans
Improve violation message in
discouraged-comment-location
- #2293, by @paul-dingemansFix malformed AST when
&&
or||
is at start of linechain-wrapping
- #2300, by @paul-dingemansDo not report false positives
type-argument-list-spacing
andtype-parameter-list-spacing
- #2303, by @paul-dingemansFix chain method continuation containing higher order function call - #2305, by @paul-dingemans
📦 Dependencies
Update dependency io.github.detekt.sarif4k:sarif4k to v0.5.0 - #2277, by @renovate[bot]
Update dependency gradle to v8.4 - #2294, by @renovate[bot]
Update actions/checkout action to v4 - #2225, by @renovate[bot]
Update actions/checkout digest to
8ade135
- #2295, by @renovate[bot]💬 Other
v1.0.0
Compare Source
💔 Breaking changes
Update and align Maven coordinates - #2195, by @paul-dingemans
Be sure to update Maven coordinates below, to get latest changes!
Add binary compatibility validator - #2131, by @mateuszkwiecinski
Replace kotlin public
data class
es with Poko compiler plugin generated ones - #2136, by @mateuszkwiecinskiAs a part of public API stabilization, data classes are no longer used in the public API. As of that, functions like
copy()
orcomponentN()
(used for destructuring declarations) are not available anymore.Promote experimental rules - #2218, by @paul-dingemans
The rules below have been promoted to non-experimental rules:
Fix statement-wrapping and align rule classes - #2178, by @paul-dingemans
Rule class
MultilineExpressionWrapping
has been renamed toMultilineExpressionWrappingRule
. Rule classStatementWrapping
has been renamed toStatementWrappingRule
.RULE_ID
constants below are moved to a different Java class at compile time. Each rule provided by Ktlint is to be accompanied by aRULE_ID
constant that can be used in theVisitorModifier.RunAfter
. Filenames did not comply with standard that it should end withRule
suffix.FUNCTION_EXPRESSION_BODY_RULE_ID
FUNCTION_LITERAL_RULE_ID
MULTILINE_EXPRESSION_WRAPPING_RULE_ID
NO_BLANK_LINE_IN_LIST_RULE_ID
NO_EMPTY_FILE_RULE_ID
Update to Kotlin 1.9 & remove TreeCopyHandler extension - #2113, by @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 for possible remediation.🆕 Features
Change default code style to
ktlint_official
- #2144, by @paul-dingemansAdd new experimental rule
class-signature
- #2119, by @paul-dingemansAdd new experimental rule
function-expression-body
- #2151, by @paul-dingemansAdd new experimental rule
chain-method-continuation
- #2088, by @atulgptAdd new experimental rule
function-literal
- #2137, by @paul-dingemansAdd new experimental rule
function-type-modifier-spacing
rule - #2216, by @t-kameyamaDefine
EditorConfigOverride
for dynamically loaded ruleset - #2194, by @paul-dingemansThe
EditorConfigOverride
parameter of theKtlintRuleEngine
can be defined using the factory methodEditorConfigOverride.from(vararg properties: Pair<EditorConfigProperty<*>, *>)
. This requires theEditorConfigProperty
's to be available at compile time. Some commonEditorConfigProperty
's are defined inktlint-rule-engine-core
which is loaded as transitive dependency ofktlint-rule-engine
and as of that are available at compile.If an
EditorConfigProperty
is defined in aRule
that is only provided via a runtime dependency, it gets a bit more complicated. Thektlint-api-consumer
example has now been updated to show how theEditorConfigProperty
can be retrieved from theRule
.Move wrapping on semicolon from
wrapping
rule tostatement-wrapping
rule - #2222, by @paul-dingemans🔧 Fixes
Do not indent class body for classes having a long super type list - #2116, by @paul-dingemans
Fix indent of explicit constructor - #2118, by @paul-dingemans
Fix incorrect formatting of nested function literal - #2107, by @paul-dingemans
Add property to disable ktlint for a glob in
.editorconfig
- #2108, by @paul-dingemansFix spacing around colon in annotations - #2126, by @paul-dingemans
Fix solving problems in 3 consecutive runs - #2132, by @paul-dingemans
Fix indent parenthesized expression - #2127, by @paul-dingemans
Fix indent of IS_EXPRESSION, PREFIX_EXPRESSION and POSTFIX_EXPRESSION - #2125, by @paul-dingemans
Do not wrap a binary expression after an elvis operator - #2134, by @paul-dingemans
Drop obsolete class LintError in ktlint-api-consumer - #2145, by @paul-dingemans
Fix null pointer exception for if-else statement with empty THEN block - #2142, by @paul-dingemans
Fix false positive in property-naming - #2141, by @paul-dingemans
Store relative path of file in baseline file - #2147, by @paul-dingemans
Fix url of build status badge - #2162, by @paul-dingemans
Update CONTRIBUTING.md - #2163, by @oshai
Fix statement-wrapping and align rule classes - #2178, by @paul-dingemans
Fix alignment of type constraints after
where
keyword in function - #2180, by @paul-dingemansFix wrapping of multiline postfix expression - #2184, by @paul-dingemans
Do not wrap expression after a spread operator - #2193, by @paul-dingemans
Do not remove parenthesis after explicit class constructor without arguments - #2226, by @paul-dingemans
Fix conflict between rules due to annotated super type call - #2227, by @paul-dingemans
Fix indentation of super type list of class in case it is preceded by a comment - #2228, by @paul-dingemans
Super type list starting with an annotation having a parameters - #2230, by @paul-dingemans
Do not wrap values in a single line enum when it is preceded by a comment or an annotation - #2229, by @paul-dingemans
📦 Dependencies
Update dependency org.codehaus.janino:janino to v3.1.10 - #2110, by @renovate[bot]
Update dependency com.google.jimfs:jimfs to v1.3.0 - #2112, by @renovate[bot]
Update dependency org.junit.jupiter:junit-jupiter to v5.10.0 - #2148, by @renovate[bot]
Update dependency io.github.oshai:kotlin-logging-jvm to v5.1.0 - #2174, by @renovate[bot]
Update dependency dev.drewhamilton.poko:poko-gradle-plugin to v0.15.0 - #2173, by @renovate[bot]
Update plugin org.gradle.toolchains.foojay-resolver-convention to v0.7.0 - #2187, by @renovate[bot]
Update dependency gradle to v8.3 - #2186, by @renovate[bot]
Update kotlin monorepo to v1.9.10 - #2197, by @renovate[bot]
Update dependency info.picocli:picocli to v4.7.5 - #2215, by @renovate[bot]
Update dependency org.jetbrains.dokka:dokka-gradle-plugin to v1.9.0 - #2221, by @renovate[bot]
Update dependency org.slf4j:slf4j-simple to v2.0.9 - #2224, by @renovate[bot]
💬 Other
Setup toolchains, compile project with Java 20 only, run test on various Java versions - #2120, by @mateuszkwiecinski
Add release-changelog-builder-action to temporary workflow - #2196, by @paul-dingemans
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), 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 this update again.
This PR has been generated by Mend Renovate. View repository job log here.