227 yield report_problem('unknown-metacommand', |
227 yield report_problem('unknown-metacommand', |
228 bad_object = element, |
228 bad_object = element, |
229 command_text = element.text, |
229 command_text = element.text, |
230 ) |
230 ) |
231 |
231 |
|
232 @problem_type('bad-line-endings', |
|
233 severity = 'hold', |
|
234 message = lambda count: str.format( |
|
235 'file contains non-DOS line endings ({count} total)', |
|
236 count = count, |
|
237 ), |
|
238 ) |
|
239 def line_endings_test(model): |
|
240 # Line endings are already checked during parse. This function |
|
241 # only serves to report them. |
|
242 if model.line_ending_errors != None: |
|
243 yield report_problem( |
|
244 'bad-line-endings', |
|
245 bad_object = model.body[model.line_ending_errors['first-at']], |
|
246 count = model.line_ending_errors['count'], |
|
247 ) |
|
248 |
232 manifest = { |
249 manifest = { |
233 'tests': [ |
250 'tests': [ |
234 colours_test, |
251 colours_test, |
235 syntax_errors, |
252 syntax_errors, |
236 bad_header, |
253 bad_header, |