forked from mirrors/jj
editorconfig: disable trim_trailing_whitespace due to multi-line bugs
The `trim_trailing_whitespace` config is not working well with multi-line string literals. I've tried to work around intellij-rust/intellij-rust#5368 twice and now I want to use the `insta` crate so I'd need to find another workaround. Let's just disable the config instead. I wouldn't be surprised if other editors have similar bugs as IntelliJ.
This commit is contained in:
parent
891641670c
commit
0c1734a19d
2 changed files with 14 additions and 7 deletions
|
@ -2,7 +2,9 @@ root = true
|
||||||
|
|
||||||
[*]
|
[*]
|
||||||
end_of_line = lf
|
end_of_line = lf
|
||||||
trim_trailing_whitespace = true
|
# Turned off because some editors otherwise remove trailing spaces within
|
||||||
|
# multi-line string literals (intellij-rust/intellij-rust#5368).
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
[*.rs]
|
[*.rs]
|
||||||
indent_style = space
|
indent_style = space
|
||||||
|
|
|
@ -24,8 +24,10 @@ fn smoke_test() {
|
||||||
|
|
||||||
let repo_path = test_env.env_root().join("repo");
|
let repo_path = test_env.env_root().join("repo");
|
||||||
// Check the output of `jj status` right after initializing repo
|
// Check the output of `jj status` right after initializing repo
|
||||||
let expected_output =
|
let expected_output = "Parent commit: 000000000000
|
||||||
"Parent commit: 000000000000 \nWorking copy : 1d1984a23811 \nThe working copy is clean\n";
|
Working copy : 1d1984a23811
|
||||||
|
The working copy is clean
|
||||||
|
";
|
||||||
test_env
|
test_env
|
||||||
.jj_cmd(&repo_path, &["status"])
|
.jj_cmd(&repo_path, &["status"])
|
||||||
.assert()
|
.assert()
|
||||||
|
@ -38,8 +40,9 @@ fn smoke_test() {
|
||||||
std::fs::write(repo_path.join("file3"), "file3").unwrap();
|
std::fs::write(repo_path.join("file3"), "file3").unwrap();
|
||||||
|
|
||||||
// The working copy's ID should have changed
|
// The working copy's ID should have changed
|
||||||
let expected_output = "Parent commit: 000000000000 \nWorking copy : 5e60c5091e43 \nWorking \
|
let expected_output = "Parent commit: 000000000000
|
||||||
copy changes:
|
Working copy : 5e60c5091e43
|
||||||
|
Working copy changes:
|
||||||
A file1
|
A file1
|
||||||
A file2
|
A file2
|
||||||
A file3
|
A file3
|
||||||
|
@ -58,7 +61,8 @@ A file3
|
||||||
.stdout(expected_output);
|
.stdout(expected_output);
|
||||||
|
|
||||||
// Add a commit description
|
// Add a commit description
|
||||||
let expected_output = "Working copy now at: 6f13b3e41065 add some files\n";
|
let expected_output = "Working copy now at: 6f13b3e41065 add some files
|
||||||
|
";
|
||||||
test_env
|
test_env
|
||||||
.jj_cmd(&repo_path, &["describe", "-m", "add some files"])
|
.jj_cmd(&repo_path, &["describe", "-m", "add some files"])
|
||||||
.assert()
|
.assert()
|
||||||
|
@ -66,7 +70,8 @@ A file3
|
||||||
.stdout(expected_output);
|
.stdout(expected_output);
|
||||||
|
|
||||||
// Close the commit
|
// Close the commit
|
||||||
let expected_output = "Working copy now at: 6ff8a22d8ce1 \n";
|
let expected_output = "Working copy now at: 6ff8a22d8ce1
|
||||||
|
";
|
||||||
test_env
|
test_env
|
||||||
.jj_cmd(&repo_path, &["close"])
|
.jj_cmd(&repo_path, &["close"])
|
||||||
.assert()
|
.assert()
|
||||||
|
|
Loading…
Reference in a new issue