Add strict mode argument to CLI

This commit is contained in:
Jonathan Sokolowski
2016-10-24 14:08:26 +11:00
parent 3b2a73d224
commit 03e0f5aa6b
3 changed files with 49 additions and 5 deletions

View File

@@ -21,6 +21,16 @@ import yaml
from yamllint import parser
PROBLEM_LEVELS = {
0: None,
1: 'warning',
2: 'error',
None: 0,
'warning': 1,
'error': 2,
}
class LintProblem(object):
"""Represents a linting problem found by yamllint."""
def __init__(self, line, column, desc='<no description>', rule=None):