Commit Graph

12 Commits (1a4f9fe00fc5bf93687879c8030b5ddef58b409d)

Author SHA1 Message Date
Hugo 4a7986b4cf Remove redundant parentheses 6 years ago
Adrien Vergé 21e81b6435 fix(rules): Use `true`/`false`, not `yes`/`no`
Although `yes` and `no` are recognized as booleans by the pyyaml parser,
the correct keywords are `true` and `false` (as highlighted by the newly
added `truthy` rule).

This commit replaces the use of `yes`/`no` by `true`/`false` and
advertise it in the docs, but also makes sure this change is
backward-compatible (so that `yes` and `no` still work).
8 years ago
Adrien Vergé b97b6ad19b style(tests): Fix new flake8 errors
This change fixes new errors detected by the last version of pycodestyle
(2.2.0), which is a dependency of flake8:

    ./tests/test_spec_examples.py:51:1: E305 expected 2 blank lines
    after class or function definition, found 1
    ./tests/test_spec_examples.py:139:1: E305 expected 2 blank lines
    after class or function definition, found 1

See pycodestyle changelog at 2.2.0 and
https://github.com/PyCQA/pycodestyle/pull/593.
8 years ago
Peter Ericson 1f472bc144 Add rule: truthy, to forbid truthy values that are not quoted 8 years ago
Adrien Vergé 29c1c60143 Tests: Use absolute path to spec examples 9 years ago
Adrien Vergé 10ad302e2f Tests: Explicit encoding for spec examples
YAML specification examples contain unusual characters, let's explicit
`encoding='utf-8'` to prevent bugs.
9 years ago
Adrien Vergé 6c8af97a40 Tests: unblacklist remaining spec examples
Since !!tags are now supported.
9 years ago
Adrien Vergé 8eb0d0ad74 Tests: unblacklist spec example 7.16
As is it supported -- it just lacks some indentation.
9 years ago
Adrien Vergé ba140ad42c Tests: Remove ghost character from YAML spec example 9 years ago
Adrien Vergé c16eec4681 Style: Fix indentation not multiple of four 9 years ago
Adrien Vergé 68618be4cc Rules: indentation: Handle sets
Sets are like mappings, that do not contain values. Example:

    set:
      ? key one
      ? key two
      ? [non, scalar, key]
9 years ago
Adrien Vergé 431a379c81 Tests: Add tests from YAML 1.2 specification
Write all examples from http://www.yaml.org/spec/1.2/spec.html in
independent files in tests/yaml-1.2-spec-examples; and test them with
yamllint.
9 years ago