Commit Graph

65 Commits (7798a71009f9871a574002e513f790748830e471)

Author SHA1 Message Date
Adrien Vergé fc108e7cee Config: Refactor to use YamlLintConfig objects 10 years ago
Adrien Vergé 792bdf99b4 yamllint version 0.5.1 10 years ago
Adrien Vergé 387d14f816 yamllint version 0.5.0 10 years ago
Adrien Vergé 38234a1d3c Doc: Generate documentation with Sphinx
HTML documentation should be built with sphinx. This enables easy
integration with Read The Docs [1]. It can also be generated manually by
running:

    make -C docs html

A man page can be generated by running:

    make -C docs man

[1]: http://yamllint.readthedocs.org/
10 years ago
Adrien Vergé 7b6f024448 yamllint version 0.4.0 10 years ago
Adrien Vergé 33224a04e4 yamllint version 0.3.0 10 years ago
Adrien Vergé 222f7a27c1 Make syntax errors prevail over all yamllint problems 10 years ago
Adrien Vergé d617eb70ae Rules: Keep a persistent context for token rules
This will be needed to build a clean indentation checking algorithm.
10 years ago
Adrien Vergé 01c12f2462 Syntax errors: Use the BaseLoader for safety 10 years ago
Adrien Vergé 918f15b68d Make syntax errors prevail over yamllint 'warnings'
When both a syntax error (unability to parse a document) and a cosmetic
yamllint problem are found at the same place, the yamllint problem had
the priority -- and the syntax error was not displayed.

This had the following problem: if a rule is at the 'warning' level, its
problems will not make the `yamllint` script return a failure return
code (`!= 0`), even when it should (because there was a syntax error,
precisely).

This commit changes this behavior by preferring yamllint problems only
when they have the 'error' level.
10 years ago
Adrien Vergé 97e2210ec9 Don't treat non-importable YAML as syntax error
`yaml.load()` exceptions are not necessarily syntax errors. For
instance, the following YAML source cannot be `load()`ed into a Python
object, but is valid nonetheless:

    ? - Detroit Tigers
      - Chicago cubs
    :
      - 2001-07-23

    ? [ New York Yankees,
        Atlanta Braves ]
    : [ 2001-07-02, 2001-08-12,
        2001-08-14 ]

This commit detects syntax errors from `yaml.parse()` exceptions rather
than `yaml.load_all()`.
10 years ago
Adrien Vergé 1235eba94e yamllint version 0.2.0 10 years ago
Adrien Vergé 11a14d4df8 Distribution: Update program description 10 years ago
Adrien Vergé 07c5b4177c Rewrite syntax errors handling and test them
If a syntax errors occurs at the same place than a regular yamllint rule
error, only the yamllint one is issued.
10 years ago
Adrien Vergé 350213b165 Initial commit 10 years ago