File tree 4 files changed +9
-1
lines changed
lib/src/compatKtLint0Dot47Dot0/java/com/diffplug/spotless/glue/ktlint/compat
4 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
12
12
## [ Unreleased]
13
13
### Fixed
14
14
* Don't treat ` @Value ` as a type annotation [ #1367 ] ( https://github.com/diffplug/spotless/pull/1367 )
15
+ * Support ` ktlint_disabled_rules ` in ` ktlint ` 0.47.x [ #1378 ] ( https://github.com/diffplug/spotless/pull/1378 )
15
16
16
17
## [ 2.30.0] - 2022-09-14
17
18
### Added
Original file line number Diff line number Diff line change 17
17
18
18
import static java .util .Collections .emptySet ;
19
19
20
+ import java .util .ArrayList ;
20
21
import java .util .LinkedHashSet ;
21
22
import java .util .List ;
22
23
import java .util .Map ;
@@ -100,9 +101,13 @@ private static EditorConfigOverride createEditorConfigOverride(final List<Rule>
100
101
.filter (rule -> rule instanceof UsesEditorConfigProperties )
101
102
.flatMap (rule -> ((UsesEditorConfigProperties ) rule ).getEditorConfigProperties ().stream ());
102
103
104
+ // get complete list of supported properties in DefaultEditorConfigProperties.INSTANCE
105
+ List <UsesEditorConfigProperties .EditorConfigProperty <?>> editorConfigProperties = new ArrayList <>(DefaultEditorConfigProperties .INSTANCE .getEditorConfigProperties ());
106
+ editorConfigProperties .add (DefaultEditorConfigProperties .INSTANCE .getKtlintDisabledRulesProperty ());
107
+
103
108
// Create a mapping of properties to their names based on rule properties and default properties
104
109
Map <String , UsesEditorConfigProperties .EditorConfigProperty <?>> supportedProperties = Stream
105
- .concat (ruleProperties , DefaultEditorConfigProperties . INSTANCE . getEditorConfigProperties () .stream ())
110
+ .concat (ruleProperties , editorConfigProperties .stream ())
106
111
.distinct ()
107
112
.collect (Collectors .toMap (property -> property .getType ().getName (), property -> property ));
108
113
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
* Don't treat ` @Value ` as a type annotation [ #1367 ] ( https://github.com/diffplug/spotless/pull/1367 )
8
+ * Support ` ktlint_disabled_rules ` in ` ktlint ` 0.47.x [ #1378 ] ( https://github.com/diffplug/spotless/pull/1378 )
8
9
9
10
## [ 6.11.0] - 2022-09-14
10
11
### Added
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
* Don't treat ` @Value ` as a type annotation [ #1367 ] ( https://github.com/diffplug/spotless/pull/1367 )
8
+ * Support ` ktlint_disabled_rules ` in ` ktlint ` 0.47.x [ #1378 ] ( https://github.com/diffplug/spotless/pull/1378 )
8
9
9
10
## [ 2.27.2] - 2022-10-10
10
11
### Fixed
You can’t perform that action at this time.
0 commit comments