mirror of
https://github.com/adrienverge/yamllint.git
synced 2025-02-25 18:55:20 -06:00
Use 'syntax' as rule name upon syntax errors
This commit is contained in:
parent
8fa9eb3ced
commit
43b95e99d1
@ -530,7 +530,7 @@ class CommandLineTestCase(unittest.TestCase):
|
||||
out, err = sys.stdout.getvalue(), sys.stderr.getvalue()
|
||||
self.assertEqual(out, (
|
||||
'stdin:2:10: [error] syntax error: '
|
||||
'mapping values are not allowed here\n'))
|
||||
'mapping values are not allowed here (syntax)\n'))
|
||||
self.assertEqual(err, '')
|
||||
|
||||
def test_run_no_warnings(self):
|
||||
|
@ -180,7 +180,7 @@ def get_syntax_error(buffer):
|
||||
except yaml.error.MarkedYAMLError as e:
|
||||
problem = LintProblem(e.problem_mark.line + 1,
|
||||
e.problem_mark.column + 1,
|
||||
'syntax error: ' + e.problem)
|
||||
'syntax error: ' + e.problem + ' (syntax)')
|
||||
problem.level = 'error'
|
||||
return problem
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user