Skip to content

Commit 7af87d1

Browse files
committed
editorconfig: don't trim trailing whitespace in tests
1 parent 9ba00e0 commit 7af87d1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.editorconfig

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,18 @@ root = true
77
[*]
88
end_of_line = lf
99
charset = utf-8
10-
trim_trailing_whitespace = true
1110
insert_final_newline = true
1211

12+
# some tests need trailing whitespace in output snapshots
13+
[!tests/]
14+
trim_trailing_whitespace = true
15+
# for actual source code files of test, we still don't want trailing whitespace
16+
[tests/**.{rs,js}]
17+
trim_trailing_whitespace = true
18+
# these specific source files need to have trailing whitespace.
19+
[tests/ui/{frontmatter/frontmatter-whitespace-3.rs,parser/shebang/shebang-space.rs}]
20+
trim_trailing_whitespace = false
21+
1322
[!src/llvm-project]
1423
indent_style = space
1524
indent_size = 4

0 commit comments

Comments
 (0)