Skip to content

Commit 3a20d52

Browse files
committed
Extend the tidy lint to ftl files
1 parent 9475717 commit 3a20d52

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/tools/tidy/src/style.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,12 @@ pub fn check(path: &Path, bad: &mut bool) {
430430
err(DOUBLE_SPACE_AFTER_DOT)
431431
}
432432

433-
if line.contains("//") {
433+
if filename.ends_with(".ftl") {
434+
let line_backticks = line.chars().filter(|ch| *ch == '`').count();
435+
if line_backticks % 2 == 1 {
436+
suppressible_tidy_err!(err, skip_odd_backticks, "odd number of backticks");
437+
}
438+
} else if line.contains("//") {
434439
let (start_line, mut backtick_count) = comment_block.unwrap_or((i + 1, 0));
435440
let line_backticks = line.chars().filter(|ch| *ch == '`').count();
436441
let comment_text = line.split("//").nth(1).unwrap();

0 commit comments

Comments
 (0)