File tree 7 files changed +14
-8
lines changed
compatKtLint0Dot49Dot0/java/com/diffplug/spotless/glue/ktlint/compat
compatKtLint0Dot50Dot0/java/com/diffplug/spotless/glue/ktlint/compat
compatKtLint1Dot0Dot0/java/com/diffplug/spotless/glue/ktlint/compat
testlib/src/main/resources/kotlin/ktlint/ktlint_official
7 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
24
24
* ** BREAKING** Replace ` PipeStepPair ` with ` FenceStep ` . ([ #1954 ] ( https://github.com/diffplug/spotless/pull/1954 ) )
25
25
### Fixed
26
26
* Ignore system git config when running tests ([ #1990 ] ( https://github.com/diffplug/spotless/issues/1990 ) )
27
+ * Correctly provide EditorConfig property types for Ktlint ([ #2052 ] ( https://github.com/diffplug/spotless/issues/2052 ) )
27
28
28
29
## [ 2.45.0] - 2024-01-23
29
30
### Added
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2023 DiffPlug
2
+ * Copyright 2023-2024 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
38
38
import com .pinterest .ktlint .rule .engine .api .LintError ;
39
39
import com .pinterest .ktlint .rule .engine .core .api .Rule ;
40
40
import com .pinterest .ktlint .rule .engine .core .api .RuleProvider ;
41
+ import com .pinterest .ktlint .rule .engine .core .api .RuleProviderKt ;
41
42
import com .pinterest .ktlint .rule .engine .core .api .editorconfig .CodeStyleEditorConfigPropertyKt ;
42
43
import com .pinterest .ktlint .rule .engine .core .api .editorconfig .EditorConfigProperty ;
43
44
import com .pinterest .ktlint .rule .engine .core .api .editorconfig .EndOfLinePropertyKt ;
@@ -142,7 +143,7 @@ public String format(
142
143
if (editorConfigPath == null || !Files .exists (editorConfigPath )) {
143
144
editorConfig = EditorConfigDefaults .Companion .getEMPTY_EDITOR_CONFIG_DEFAULTS ();
144
145
} else {
145
- editorConfig = EditorConfigDefaults .Companion .load (editorConfigPath );
146
+ editorConfig = EditorConfigDefaults .Companion .load (editorConfigPath , RuleProviderKt . propertyTypes ( allRuleProviders ) );
146
147
}
147
148
148
149
return new KtLintRuleEngine (
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2023 DiffPlug
2
+ * Copyright 2023-2024 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
17
17
18
18
import java .nio .file .Files ;
19
19
import java .nio .file .Path ;
20
- import java .util .Collections ;
21
20
import java .util .List ;
22
21
import java .util .Map ;
23
22
import java .util .Objects ;
38
37
import com .pinterest .ktlint .rule .engine .core .api .Rule ;
39
38
import com .pinterest .ktlint .rule .engine .core .api .RuleId ;
40
39
import com .pinterest .ktlint .rule .engine .core .api .RuleProvider ;
40
+ import com .pinterest .ktlint .rule .engine .core .api .RuleProviderKt ;
41
41
import com .pinterest .ktlint .rule .engine .core .api .RuleSetId ;
42
42
import com .pinterest .ktlint .rule .engine .core .api .editorconfig .CodeStyleEditorConfigPropertyKt ;
43
43
import com .pinterest .ktlint .rule .engine .core .api .editorconfig .EditorConfigProperty ;
@@ -105,7 +105,7 @@ public String format(
105
105
if (editorConfigPath == null || !Files .exists (editorConfigPath )) {
106
106
editorConfig = EditorConfigDefaults .Companion .getEMPTY_EDITOR_CONFIG_DEFAULTS ();
107
107
} else {
108
- editorConfig = EditorConfigDefaults .Companion .load (editorConfigPath , Collections . emptySet ( ));
108
+ editorConfig = EditorConfigDefaults .Companion .load (editorConfigPath , RuleProviderKt . propertyTypes ( allRuleProviders ));
109
109
}
110
110
111
111
return new KtLintRuleEngine (
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2023 DiffPlug
2
+ * Copyright 2023-2024 DiffPlug
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
17
17
18
18
import java .nio .file .Files ;
19
19
import java .nio .file .Path ;
20
- import java .util .Collections ;
21
20
import java .util .List ;
22
21
import java .util .Map ;
23
22
import java .util .Objects ;
38
37
import com .pinterest .ktlint .rule .engine .core .api .Rule ;
39
38
import com .pinterest .ktlint .rule .engine .core .api .RuleId ;
40
39
import com .pinterest .ktlint .rule .engine .core .api .RuleProvider ;
40
+ import com .pinterest .ktlint .rule .engine .core .api .RuleProviderKt ;
41
41
import com .pinterest .ktlint .rule .engine .core .api .RuleSetId ;
42
42
import com .pinterest .ktlint .rule .engine .core .api .editorconfig .CodeStyleEditorConfigPropertyKt ;
43
43
import com .pinterest .ktlint .rule .engine .core .api .editorconfig .EditorConfigProperty ;
@@ -105,7 +105,7 @@ public String format(
105
105
if (editorConfigPath == null || !Files .exists (editorConfigPath )) {
106
106
editorConfig = EditorConfigDefaults .Companion .getEMPTY_EDITOR_CONFIG_DEFAULTS ();
107
107
} else {
108
- editorConfig = EditorConfigDefaults .Companion .load (editorConfigPath , Collections . emptySet ( ));
108
+ editorConfig = EditorConfigDefaults .Companion .load (editorConfigPath , RuleProviderKt . propertyTypes ( allRuleProviders ));
109
109
}
110
110
111
111
return new KtLintRuleEngine (
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
5
5
## [ Unreleased]
6
6
### Fixed
7
7
* Ignore system git config when running tests ([ #1990 ] ( https://github.com/diffplug/spotless/issues/1990 ) )
8
+ * Correctly provide EditorConfig property types for Ktlint ([ #2052 ] ( https://github.com/diffplug/spotless/issues/2052 ) )
8
9
* Fixed memory leak introduced in 6.21.0 ([ #2067 ] ( https://github.com/diffplug/spotless/issues/2067 ) )
9
10
### Changes
10
11
* Bump default ` ktfmt ` version to latest ` 0.46 ` -> ` 0.47 ` . ([ #2045 ] ( https://github.com/diffplug/spotless/pull/2045 ) )
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
5
5
## [ Unreleased]
6
6
### Fixed
7
7
* Ignore system git config when running tests ([ #1990 ] ( https://github.com/diffplug/spotless/issues/1990 ) )
8
+ * Correctly provide EditorConfig property types for Ktlint ([ #2052 ] ( https://github.com/diffplug/spotless/issues/2052 ) )
8
9
### Changes
9
10
* Bump default ` ktfmt ` version to latest ` 0.46 ` -> ` 0.47 ` . ([ #2045 ] ( https://github.com/diffplug/spotless/pull/2045 ) )
10
11
* Bump default ` sortpom ` version to latest ` 3.2.1 ` -> ` 3.4.0 ` . ([ #2049 ] ( https://github.com/diffplug/spotless/pull/2049 ) )
Original file line number Diff line number Diff line change @@ -4,3 +4,5 @@ root = true
4
4
ij_kotlin_allow_trailing_comma = true
5
5
ij_kotlin_allow_trailing_comma_on_call_site = true
6
6
ktlint_code_style = ktlint_official
7
+ # See https://github.com/diffplug/spotless/issues/1904.
8
+ ktlint_function_signature_rule_force_multiline_when_parameter_count_greater_or_equal_than = 2
You can’t perform that action at this time.
0 commit comments