Skip to content

Commit f04f26d

Browse files
authored
Rollup merge of rust-lang#144642 - lolbinarycat:editorconfig-no-run-make, r=lcnr
editorconfig: don't trim trailing whitespace in tests some test snapshot files require trailing whitespace, and previously manually editing those snapshot files (as is required for run-make tests and some platform-specific tests) in an editor with editorconfig support would cause that whitespace to be removed, [causing CI failures like this one](rust-lang#144596 (comment))
2 parents d9dba3a + 7af87d1 commit f04f26d

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)