File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
src/main/java/com/diffplug/gradle/spotless Expand file tree Collapse file tree 2 files changed +6
-2
lines changed 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
* Fix Eclipse JDT on some settings files. ([ #1864 ] ( https://github.com/diffplug/spotless/pull/1864 ) fixes [ #1638 ] ( https://github.com/diffplug/spotless/issues/1638 ) )
8
+ * Check if EditorConfig file exist for Ktlint in KotlinGradleExtension. ([ #1889 ] ( https://github.com/diffplug/spotless/pull/1889 )
8
9
### Changes
9
10
* Bump default ` ktlint ` version to latest ` 1.0.0 ` -> ` 1.0.1 ` . ([ #1855 ] ( https://github.com/diffplug/spotless/pull/1855 ) )
10
11
### Fixed
Original file line number Diff line number Diff line change @@ -74,11 +74,14 @@ public class KotlinFormatExtension {
74
74
}
75
75
76
76
public KotlinFormatExtension setEditorConfigPath (Object editorConfigPath ) throws IOException {
77
-
78
77
if (editorConfigPath == null ) {
79
78
this .editorConfigPath = null ;
80
79
} else {
81
- this .editorConfigPath = FileSignature .signAsList (getProject ().file (editorConfigPath ));
80
+ File editorConfigFile = getProject ().file (editorConfigPath );
81
+ if (!editorConfigFile .exists ()) {
82
+ throw new IllegalArgumentException ("EditorConfig file does not exist: " + editorConfigFile );
83
+ }
84
+ this .editorConfigPath = FileSignature .signAsList (editorConfigFile );
82
85
}
83
86
replaceStep (createStep ());
84
87
return this ;
You can’t perform that action at this time.
0 commit comments