Skip to content

Commit b29f4dd

Browse files
authored
Remove default indent from .editorconfig (#49183)
Backport of #49136. Prior to 3a3e5f6, there was no default indent configured in `.editorconfig`. This changed to 4 spaces when we configured an explicit indent of 2 for Gradle files. However, this change meant that YAML files then had 4-space indents, which is valid, but the repo's YAML files typically use 2-space indents. Remove the default indent again, and instead explicitly set an indent size for a variety of file types.
1 parent 150db2b commit b29f4dd

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

.editorconfig

+19-2
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,27 @@ charset = utf-8
77
trim_trailing_whitespace = true
88
insert_final_newline = true
99
indent_style = space
10+
11+
[*.gradle]
12+
indent_size = 2
13+
14+
[*.groovy]
1015
indent_size = 4
1116

12-
[*.bat]
17+
[*.java]
18+
indent_size = 4
19+
20+
[*.json]
1321
indent_size = 2
1422

15-
[*.gradle]
23+
[*.py]
1624
indent_size = 2
25+
26+
[*.sh]
27+
indent_size = 2
28+
29+
[*.{yml,yaml}]
30+
indent_size = 2
31+
32+
[*.{xsd,xml}]
33+
indent_size = 4

0 commit comments

Comments
 (0)