diff options
| author | est31 <MTest31@outlook.com> | 2023-03-04 06:55:35 +0100 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2023-03-11 20:43:04 +0100 |
| commit | 3a20d52694c9a293d2fbf1aa7cc1c1643b3e30ec (patch) | |
| tree | b57f8fe71783971db47893b27f272d3eded1822e | |
| parent | 9475717ea302b43dcca2ccf49628525cfe82fbf7 (diff) | |
| download | rust-3a20d52694c9a293d2fbf1aa7cc1c1643b3e30ec.tar.gz rust-3a20d52694c9a293d2fbf1aa7cc1c1643b3e30ec.zip | |
Extend the tidy lint to ftl files
| -rw-r--r-- | src/tools/tidy/src/style.rs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tools/tidy/src/style.rs b/src/tools/tidy/src/style.rs index af6231ed0df..e3f98f42d7d 100644 --- a/src/tools/tidy/src/style.rs +++ b/src/tools/tidy/src/style.rs @@ -430,7 +430,12 @@ pub fn check(path: &Path, bad: &mut bool) { err(DOUBLE_SPACE_AFTER_DOT) } - if line.contains("//") { + if filename.ends_with(".ftl") { + let line_backticks = line.chars().filter(|ch| *ch == '`').count(); + if line_backticks % 2 == 1 { + suppressible_tidy_err!(err, skip_odd_backticks, "odd number of backticks"); + } + } else if line.contains("//") { let (start_line, mut backtick_count) = comment_block.unwrap_or((i + 1, 0)); let line_backticks = line.chars().filter(|ch| *ch == '`').count(); let comment_text = line.split("//").nth(1).unwrap(); |
