File tree Expand file tree Collapse file tree 4 files changed +9
-1
lines changed
lib/src/compatKtLint0Dot47Dot0/java/com/diffplug/spotless/glue/ktlint/compat Expand file tree Collapse file tree 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 (
1212## [ Unreleased]
1313### Fixed
1414* 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 )
1516
1617## [ 2.30.0] - 2022-09-14
1718### Added
Original file line number Diff line number Diff line change 1717
1818import static java .util .Collections .emptySet ;
1919
20+ import java .util .ArrayList ;
2021import java .util .LinkedHashSet ;
2122import java .util .List ;
2223import java .util .Map ;
@@ -100,9 +101,13 @@ private static EditorConfigOverride createEditorConfigOverride(final List<Rule>
100101 .filter (rule -> rule instanceof UsesEditorConfigProperties )
101102 .flatMap (rule -> ((UsesEditorConfigProperties ) rule ).getEditorConfigProperties ().stream ());
102103
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+
103108 // Create a mapping of properties to their names based on rule properties and default properties
104109 Map <String , UsesEditorConfigProperties .EditorConfigProperty <?>> supportedProperties = Stream
105- .concat (ruleProperties , DefaultEditorConfigProperties . INSTANCE . getEditorConfigProperties () .stream ())
110+ .concat (ruleProperties , editorConfigProperties .stream ())
106111 .distinct ()
107112 .collect (Collectors .toMap (property -> property .getType ().getName (), property -> property ));
108113
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 (
55## [ Unreleased]
66### Fixed
77* 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 )
89
910## [ 6.11.0] - 2022-09-14
1011### 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 (
55## [ Unreleased]
66### Fixed
77* 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 )
89
910## [ 2.27.2] - 2022-10-10
1011### Fixed
You can’t perform that action at this time.
0 commit comments