@@ -125,16 +125,13 @@ fn should_ignore(line: &str) -> bool {
125125
126126/// Returns `true` if `line` is allowed to be longer than the normal limit.
127127fn 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 ,
133131 // 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) ,
135134 }
136-
137- false
138135}
139136
140137enum Directive {
@@ -230,7 +227,7 @@ pub fn check(path: &Path, bad: &mut bool) {
230227 super :: walk ( path, & mut skip, & mut |entry, contents| {
231228 let file = entry. path ( ) ;
232229 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" ] ;
234231 if extensions. iter ( ) . all ( |e| !filename. ends_with ( e) ) || filename. starts_with ( ".#" ) {
235232 return ;
236233 }
0 commit comments