Commit Graph

483 Commits (master)
 

Author SHA1 Message Date
Hugo 4a7986b4cf Remove redundant parentheses 6 years ago
Hugo 3d1ad9a176 Add explicit Trove classifers for PyPI 6 years ago
Hugo 8da6e36bf1 Add python_requires to help pip 6 years ago
Hugo c281d48507 Drop support for EOL Python 2.6 6 years ago
Adrien Vergé 8bdddf6e89 docs: Warn about Python 2 and problems with line-length
Closes #146.
6 years ago
Adrien Vergé c8032c086b line-length: Add tests for lines containing unicode characters
Some unicode characters span accross multiple bytes. Python 3 is OK with
that, but Python 2 reports an incorrect number of characters.

Related to https://github.com/adrienverge/yamllint/issues/146
6 years ago
Adrien Vergé ea045c41b7 CI: Drop Python 3.3 support
The `pkg_resources` package inside `setuptools` explicitly [disallows
Python 3.3](7392f01ffc (diff-81de4a30a55fcc3fb944f8387ea9ec94)):

    if (3, 0) < sys.version_info < (3, 4):
        raise RuntimeError("Python 3.4 or later is required")

It's time to drop support for 3.3.
6 years ago
Adrien Vergé c803dd5f6d docs(CHANGELOG): Fix RST format for code snippets 6 years ago
Adrien Vergé 318a12bbe6 yamllint version 1.13.0 6 years ago
Adrien Vergé 66adaee66c docs: Add documentation on the new -f colored option 6 years ago
sedrubal 5062b91cac cli: Add -f colored to force colors
`-f standard` shows non-colored output,
`-f colored` shows colored output,
`-f auto` is the new default, it chooses `standard` or `colored`
depending on terminal capabilities.
6 years ago
sedrubal 3ef85739e3 Use isinstance(x, y) instead of type(x) == y
Fixes pylint C0123.
6 years ago
Adrien Vergé dc4a9f4fff yamllint version 1.12.1 6 years ago
Adrien Vergé 8354d50016 quoted-strings: Fix broken rule
Original implementation was completely broken. Documentation and actual
behavior were different. Numbers and booleans were detected as wrong, as
well as explicit types.

Fixes #136 and #130.
6 years ago
Adrien Vergé 524d721f0d Update .gitignore to exclude build/ 6 years ago
Adrien Vergé e864f57d37 docs: Fix missing quoted-strings module in documentation 6 years ago
Adrien Vergé d41b64aa97 yamllint version 1.12.0 6 years ago
Guido Wischrop (mgm tp) aaa8777f1d Add quoted-strings rule
* taken from https://github.com/adrienverge/yamllint/pull/110 (submitted by @jurajseffer)
* small fixes for generic and multi-line strings
* fixes for comments from @adrienverge
6 years ago
Adrien Vergé 479f580202 CI: Fix tests failing on Travis for Python 2.6
Because installing dependencies for `coveralls` now fails with:

    Collecting pycparser (from cffi>=1.7->cryptography>=1.3.4; python_version <= "2.7" and extra == "secure"->urllib3[secure]; python_version < "3"->coveralls)
    [...]
    pycparser requires Python '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*' but the running Python is 2.6.9
6 years ago
Justin Foreman e4e99f0aba docs: Update README for CentOS dependency 7 years ago
Adrien Vergé 203cfc20f0 docs: Remove sudo from pip installation instructions 7 years ago
Adrien Vergé 51c30505b5 docs: Add Mac OS installation instructions
See https://github.com/adrienverge/yamllint/issues/91 and
https://github.com/Homebrew/homebrew-core/blob/af2bbe9/Formula/yamllint.rb
7 years ago
Adrien Vergé ff9ebde608 docs: Remove old Debian / Ubuntu installation instructions 7 years ago
Adrien Vergé 506e066410 yamllint version 1.11.1 7 years ago
Adrien Vergé 54f21c0514 parser: Fix crash with latest PyYAML
There is a backwards-incompatible change in PyYAML that induces a crash
if `check_token()` is not called before `peek_token()`. See commit
a02d17a in PyYAML or https://github.com/yaml/pyyaml/pull/150.

Closes #105.
7 years ago
Adam Johnson 36b4776778 Clarify documentation on the 'truthy' rule
I like the 'truthy' rule but its documentation and message have confused several of my colleagues. I've tried rewriting it to be clearer.
7 years ago
Adrien Vergé 3bdc1b6e1b CI: Don't install Sphinx if Python 2
Recently builds started to fail with:

    Collecting sphinx
      Downloading Sphinx-1.7.2-py2.py3-none-any.whl (1.9MB)
        100% |████████████████████████████████| 1.9MB 731kB/s
    Sphinx requires Python '>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*'
    but the running Python is 2.6.9
7 years ago
Adrien Vergé c16934117b CI: Remove Travis hack for enum34 crashing on Python 3.6
Revert commit 8b9eab3, it is not needed anymore.
7 years ago
Eimert 8ab680635b docs: Make `ignore` examples clearer
[Solved](https://github.com/metacloud/molecule/issues/1228), when
yamllint is used by molecule.
7 years ago
Anthony Sottile 503bde9e70 pre-commit is now served over https! 7 years ago
Nick Burke 1b379628d7 key-duplicates: Handle merge keys (<<)
Merge keys are described here: http://yaml.org/type/merge.html
They shouldn't be considered as duplicated keys.

Fixes https://github.com/adrienverge/yamllint/issues/88
7 years ago
Adrien Vergé 6a842229fd yamllint version 1.11.0 7 years ago
Adrien Vergé 8b9eab33bf CI: Fix failing tests for Python 3.6 because of flake8-import-order
See issue https://github.com/PyCQA/flake8-import-order/issues/149
7 years ago
xieenlong 22e792a433 Feature: checking octal numbers 7 years ago
Adrien Vergé f713dc8be2 style: Fix E100 and E202 errors reported by pycodestyle 7 years ago
Adrien Vergé a92743c8ca yamllint version 1.10.0 7 years ago
Adrien Vergé 501def327d tests: Use `sys.executable` instead of hard-coded 'python'
To test yamllint as a module, tests run commands like
`python -m yamllint`. But some environments (like continuous integration
of Debian or CentOS) don't always include the `python` executable (they
use `python3` instead).

Let's dynamically detect the Python executable path.
7 years ago
Adrien Vergé ed5d319df8 tests: Use en_US.UTF-8 locale when C.UTF-8 not available
Some operating systems don't have the `C.UTF-8` locale installed yet
(for instance, CentOS 7). In such a case, fallback to `en_US.UTF-8` so
that tests can be run.

This follows commit 92ff315.
7 years ago
Adrien Vergé 6ec1e7b54a Distribution: Include tests in dist file
Since commit e948509 ("setup.py - don't distribute tests"), tests files
are not included in the `.tar.gz` bundle on a fresh repo clone. (On old
repos they were still included, because listed in
`yamllint.egg-info/SOURCES.txt`.)

Let's explicitly include them.
7 years ago
Adrien Vergé c4475ece34 empty-values: Add `forbid-in-flow-mappings` conf
This allows preventing implicit `null` from empty values in flow
mappings.

For example:

    {a:}

    {a:, b: 2}

    {
      a: {
        b: ,
        c: {
          d: 4,
          e:
        }
      },
      f:
    }
7 years ago
Greg Dubicki 8537b0a164 Add rule: empty-values, to forbid implicit nulls
only in block mappings for now
7 years ago
Adrien Vergé 83ea74e2f8 CI: Compile documentation on Travis 7 years ago
Waylan Limberg e43768f203 Better color support check.
Not all systems have `isatty` attribute on `sys.stdout` so check for
existance of attribute before checking value. Also don't use color in
Windows unless environ indicates support. Apparently, Windows can indicate
support by either the presence of `ANSICON` environ variable or if the
`TERM` environ variable is set to `ANSI`. Fixes #79.

No additional tests added, as the relevant tests use fcntl, which is a
Unix only lib. In fact, the tests won't even run in Windows.
7 years ago
Adrien Vergé d422274563 style: Fix E722 errors reported by pycodestyle
Since a few days ago pycodestyle (formerly called pep8) has a new check:
E722 warning for bare except clauses.

Let's fix our code.
7 years ago
Adrien Vergé 2d931b5a81 yamllint version 1.9.0 7 years ago
Adrien Vergé 773bfc0f3c key-ordering: Add more test cases and documentation 7 years ago
Johannes F. Knauf 1543d0e435 New rule key-ordering
closes #67
7 years ago
Adrien Vergé f82346dac7 indentation: Add more test cases for key following empty list 7 years ago
Tim Wade ca540c113b Fix indentation rule for key following empty list
If a key-value pair follows an empty list, i.e.:

```yaml
a:
-
b: c
```

yamllint will complain:

```
warning  wrong indentation: expected 2 but found 0  (indentation)
```

This is because it is expecting the second key to be a continuation of
the block entry above:

```yaml
a:
-
  b: c
```

However, both are perfectly valid, though structurally different.
7 years ago
Adrien Vergé c8fc170ff0 yamllint version 1.8.2 7 years ago