diff --git a/docs/development.rst b/docs/development.rst index c6633e7..3dc86a7 100644 --- a/docs/development.rst +++ b/docs/development.rst @@ -1,5 +1,11 @@ Development =========== +yamllint provides both a script and a Python module. The latter can be used to +write your own linting tools: + +.. autoclass:: yamllint.errors.LintProblem + :members: + .. automodule:: yamllint :members: diff --git a/yamllint/errors.py b/yamllint/errors.py index 8e1f02a..fa2f21b 100644 --- a/yamllint/errors.py +++ b/yamllint/errors.py @@ -16,10 +16,15 @@ class LintProblem(object): + """Represents a linting problem found by yamllint.""" def __init__(self, line, column, desc='', rule=None): + #: Line on which the problem was found (starting at 1) self.line = line + #: Column on which the problem was found (starting at 1) self.column = column + #: Human-readable description of the problem self.desc = desc + #: Identifier of the rule that detected the problem self.rule = rule self.level = None