Skip to content

Commit 7129b19

Browse files
committed
.editorconfig: treat only extension-less files as shell scripts
Using the workaround from editorconfig/editorconfig#401 (comment)
1 parent dc06258 commit 7129b19

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

.editorconfig

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,23 @@ trim_trailing_whitespace = true
99
# We usually want to indent using spaces
1010
indent_style = space
1111

12-
[*.{cpp,h}]
13-
indent_size = 4
14-
15-
[*.yml]
16-
indent_size = 2
17-
18-
# Assume that most of the files in the .build/ directory are shell scripts...
12+
# Files in the .build/ directory without a file extension are shell scripts
1913
[.build/*]
2014
indent_size = 4
2115
indent_style = tab
2216

23-
# ... but use 4-space indentation for PowerShell scripts
17+
[.build/*.*]
18+
indent_size = unset
19+
indent_style = space
20+
2421
[*.ps1]
2522
indent_size = 4
26-
indent_style = space
23+
24+
[*.yml]
25+
indent_size = 2
26+
27+
[*.{cpp,h}]
28+
indent_size = 4
2729

2830
[{CMakeLists.txt,*.cmake}]
2931
indent_size = 4

0 commit comments

Comments
 (0)