@@ -125,16 +125,13 @@ fn should_ignore(line: &str) -> bool {
125
125
126
126
/// Returns `true` if `line` is allowed to be longer than the normal limit.
127
127
fn long_line_is_ok ( extension : & str , is_error_code : bool , max_columns : usize , line : & str ) -> bool {
128
- if extension != "md" || is_error_code {
129
- if line_is_url ( is_error_code, max_columns, line) || should_ignore ( line) {
130
- return true ;
131
- }
132
- } else if extension == "md" {
128
+ match extension {
129
+ // fluent files are allowed to be any length
130
+ "ftl" => true ,
133
131
// non-error code markdown is allowed to be any length
134
- return true ;
132
+ "md" if !is_error_code => true ,
133
+ _ => line_is_url ( is_error_code, max_columns, line) || should_ignore ( line) ,
135
134
}
136
-
137
- false
138
135
}
139
136
140
137
enum Directive {
@@ -230,7 +227,7 @@ pub fn check(path: &Path, bad: &mut bool) {
230
227
super :: walk ( path, & mut skip, & mut |entry, contents| {
231
228
let file = entry. path ( ) ;
232
229
let filename = file. file_name ( ) . unwrap ( ) . to_string_lossy ( ) ;
233
- let extensions = [ ".rs" , ".py" , ".js" , ".sh" , ".c" , ".cpp" , ".h" , ".md" , ".css" ] ;
230
+ let extensions = [ ".rs" , ".py" , ".js" , ".sh" , ".c" , ".cpp" , ".h" , ".md" , ".css" , ".ftl" ] ;
234
231
if extensions. iter ( ) . all ( |e| !filename. ends_with ( e) ) || filename. starts_with ( ".#" ) {
235
232
return ;
236
233
}
0 commit comments