mirror of
https://github.com/adrienverge/yamllint.git
synced 2025-02-25 18:55:20 -06:00
Doc: Document how to use the yamllint Python module
This commit is contained in:
parent
6e9de02eac
commit
237db5aeef
@ -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:
|
||||
|
@ -16,10 +16,15 @@
|
||||
|
||||
|
||||
class LintProblem(object):
|
||||
"""Represents a linting problem found by yamllint."""
|
||||
def __init__(self, line, column, desc='<no description>', 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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user