Skip to content

Commit 3d58edc

Browse files
Rollup merge of #153710 - cyrgani:tidy-ftl, r=bjorn3
remove `.ftl` checks from tidy These files have been removed following rust-lang/compiler-team#959. Part of #151366.
2 parents 54b616f + 59733c6 commit 3d58edc

2 files changed

Lines changed: 2 additions & 10 deletions

File tree

src/tools/tidy/src/style.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ fn should_ignore(line: &str) -> bool {
227227
/// Returns `true` if `line` is allowed to be longer than the normal limit.
228228
fn long_line_is_ok(extension: &str, is_error_code: bool, max_columns: usize, line: &str) -> bool {
229229
match extension {
230-
// fluent files are allowed to be any length
231-
"ftl" => true,
232230
// non-error code markdown is allowed to be any length
233231
"md" if !is_error_code => true,
234232
// HACK(Ezrashaw): there is no way to split a markdown header over multiple lines
@@ -357,7 +355,7 @@ pub fn check(path: &Path, tidy_ctx: TidyCtx) {
357355
return false;
358356
}
359357

360-
let extensions = ["rs", "py", "js", "sh", "c", "cpp", "h", "md", "css", "ftl", "goml"];
358+
let extensions = ["rs", "py", "js", "sh", "c", "cpp", "h", "md", "css", "goml"];
361359

362360
// NB: don't skip paths without extensions (or else we'll skip all directories and will only check top level files)
363361
if path.extension().is_none_or(|ext| !extensions.iter().any(|e| ext == OsStr::new(e))) {
@@ -602,12 +600,7 @@ pub fn check(path: &Path, tidy_ctx: TidyCtx) {
602600
err(DOUBLE_SPACE_AFTER_DOT)
603601
}
604602

605-
if filename.ends_with(".ftl") {
606-
let line_backticks = trimmed.chars().filter(|ch| *ch == '`').count();
607-
if line_backticks % 2 == 1 {
608-
suppressible_tidy_err!(err, skip_odd_backticks, "odd number of backticks");
609-
}
610-
} else if trimmed.contains("//") {
603+
if trimmed.contains("//") {
611604
let (start_line, mut backtick_count) = comment_block.unwrap_or((i + 1, 0));
612605
let line_backticks = trimmed.chars().filter(|ch| *ch == '`').count();
613606
let comment_text = trimmed.split("//").nth(1).unwrap();

src/tools/tidy/src/ui_tests.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ fn check_unexpected_extension(check: &mut RunningCheck, file_path: &Path, ext: &
214214
"stdout", // expected stdout file, corresponds to a rs file
215215
"fixed", // expected source file after applying fixes
216216
"md", // test directory descriptions
217-
"ftl", // translation tests
218217
];
219218

220219
const EXTENSION_EXCEPTION_PATHS: &[&str] = &[

0 commit comments

Comments
 (0)