Extend the tidy lint to ftl files
This commit is contained in:
parent
9475717ea3
commit
3a20d52694
@ -430,7 +430,12 @@ fn skip(path: &Path) -> 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();
|
||||
|
Loading…
Reference in New Issue
Block a user