diff -Nru yamllint-1.11.0/CHANGELOG.rst yamllint-1.11.1/CHANGELOG.rst --- yamllint-1.11.0/CHANGELOG.rst 2018-02-21 12:42:06.000000000 +0000 +++ yamllint-1.11.1/CHANGELOG.rst 2018-04-06 09:11:32.000000000 +0000 @@ -1,6 +1,15 @@ Changelog ========= +1.11.1 (2018-04-06) +------------------- + +- Handle merge keys (`<<`) in the `key-duplicates` rule +- Update documentation about pre-commit +- Make examples for `ignore` rule clearer +- Clarify documentation on the 'truthy' rule +- Fix crash in parser due to a change in PyYAML > 3.12 + 1.11.0 (2018-02-21) ------------------- diff -Nru yamllint-1.11.0/debian/changelog yamllint-1.11.1/debian/changelog --- yamllint-1.11.0/debian/changelog 2018-03-06 16:35:44.000000000 +0000 +++ yamllint-1.11.1/debian/changelog 2018-05-09 12:24:10.000000000 +0000 @@ -1,3 +1,10 @@ +yamllint (1.11.1-1) unstable; urgency=medium + + * New upstream version 1.11.1 + * Updated Standards-Version: 4.1.4 (no changes needed) + + -- Philipp Huebner Wed, 09 May 2018 14:24:10 +0200 + yamllint (1.11.0-1) unstable; urgency=medium * New upstream version 1.11.0 diff -Nru yamllint-1.11.0/debian/control yamllint-1.11.1/debian/control --- yamllint-1.11.0/debian/control 2018-03-06 16:33:35.000000000 +0000 +++ yamllint-1.11.1/debian/control 2018-05-09 12:21:07.000000000 +0000 @@ -1,28 +1,26 @@ Source: yamllint -Section: devel -Priority: optional Maintainer: Adrien Vergé Uploaders: Philipp Huebner -Build-Depends: - debhelper (>=11~), - python3-all, - python3-nose, - python3-pathspec, - python3-setuptools, - python3-sphinx, - python3-yaml, -Standards-Version: 4.1.3 -Homepage: https://github.com/adrienverge/yamllint -Vcs-Git: https://github.com/adrienverge/yamllint.git -b packaging +Section: devel +Priority: optional +Build-Depends: debhelper (>=11~), + python3-all, + python3-nose, + python3-pathspec, + python3-setuptools, + python3-sphinx, + python3-yaml +Standards-Version: 4.1.4 Vcs-Browser: https://github.com/adrienverge/yamllint/tree/packaging +Vcs-Git: https://github.com/adrienverge/yamllint.git -b packaging +Homepage: https://github.com/adrienverge/yamllint Package: yamllint Architecture: all -Depends: - ${misc:Depends}, - ${python3:Depends}, - ${shlibs:Depends}, - python3-pkg-resources +Depends: ${misc:Depends}, + ${python3:Depends}, + ${shlibs:Depends}, + python3-pkg-resources Description: Linter for YAML files yamllint does not only check for syntax validity, but for weirdnesses like key repetition and cosmetic problems such as lines length, trailing spaces, diff -Nru yamllint-1.11.0/docs/configuration.rst yamllint-1.11.1/docs/configuration.rst --- yamllint-1.11.0/docs/configuration.rst 2018-02-21 12:42:06.000000000 +0000 +++ yamllint-1.11.1/docs/configuration.rst 2018-04-06 09:11:32.000000000 +0000 @@ -129,7 +129,7 @@ ignore: | /this/specific/file.yaml - /all/this/directory/ + all/this/directory/ *.template.yaml or ignore paths only for specific rules: @@ -167,4 +167,4 @@ trailing-spaces: ignore: | *.ignore-trailing-spaces.yaml - /ascii-art/* + ascii-art/* diff -Nru yamllint-1.11.0/.pre-commit-hooks.yaml yamllint-1.11.1/.pre-commit-hooks.yaml --- yamllint-1.11.0/.pre-commit-hooks.yaml 2018-02-21 12:42:06.000000000 +0000 +++ yamllint-1.11.1/.pre-commit-hooks.yaml 2018-04-06 09:11:32.000000000 +0000 @@ -1,7 +1,7 @@ --- # For use with pre-commit. -# See usage instructions at http://pre-commit.com +# See usage instructions at https://pre-commit.com - id: yamllint name: yamllint diff -Nru yamllint-1.11.0/tests/rules/test_key_duplicates.py yamllint-1.11.1/tests/rules/test_key_duplicates.py --- yamllint-1.11.0/tests/rules/test_key_duplicates.py 2018-02-21 12:42:06.000000000 +0000 +++ yamllint-1.11.1/tests/rules/test_key_duplicates.py 2018-04-06 09:11:32.000000000 +0000 @@ -78,6 +78,15 @@ ' duplicates with\n' ' many styles\n' ': 1\n', conf) + self.check('---\n' + 'Merge Keys are OK:\n' + 'anchor_one: &anchor_one\n' + ' one: one\n' + 'anchor_two: &anchor_two\n' + ' two: two\n' + 'anchor_reference:\n' + ' <<: *anchor_one\n' + ' <<: *anchor_two\n', conf) def test_enabled(self): conf = 'key-duplicates: enable' @@ -147,6 +156,15 @@ ': 1\n', conf, problem1=(3, 1), problem2=(4, 1), problem3=(5, 3), problem4=(7, 3)) + self.check('---\n' + 'Merge Keys are OK:\n' + 'anchor_one: &anchor_one\n' + ' one: one\n' + 'anchor_two: &anchor_two\n' + ' two: two\n' + 'anchor_reference:\n' + ' <<: *anchor_one\n' + ' <<: *anchor_two\n', conf) def test_key_tokens_in_flow_sequences(self): conf = 'key-duplicates: enable' diff -Nru yamllint-1.11.0/yamllint/__init__.py yamllint-1.11.1/yamllint/__init__.py --- yamllint-1.11.0/yamllint/__init__.py 2018-02-21 12:42:06.000000000 +0000 +++ yamllint-1.11.1/yamllint/__init__.py 2018-04-06 09:11:32.000000000 +0000 @@ -22,7 +22,7 @@ APP_NAME = 'yamllint' -APP_VERSION = '1.11.0' +APP_VERSION = '1.11.1' APP_DESCRIPTION = __doc__ __author__ = u'Adrien Vergé' diff -Nru yamllint-1.11.0/yamllint/parser.py yamllint-1.11.1/yamllint/parser.py --- yamllint-1.11.0/yamllint/parser.py 2018-02-21 12:42:06.000000000 +0000 +++ yamllint-1.11.1/yamllint/parser.py 2018-04-06 09:11:32.000000000 +0000 @@ -125,7 +125,8 @@ curr = yaml_loader.get_token() while curr is not None: next = yaml_loader.get_token() - nextnext = yaml_loader.peek_token() + nextnext = (yaml_loader.peek_token() + if yaml_loader.check_token() else None) yield Token(curr.start_mark.line + 1, curr, prev, next, nextnext) diff -Nru yamllint-1.11.0/yamllint/rules/key_duplicates.py yamllint-1.11.1/yamllint/rules/key_duplicates.py --- yamllint-1.11.0/yamllint/rules/key_duplicates.py 2018-02-21 12:42:06.000000000 +0000 +++ yamllint-1.11.1/yamllint/rules/key_duplicates.py 2018-04-06 09:11:32.000000000 +0000 @@ -91,7 +91,9 @@ # This check is done because KeyTokens can be found inside flow # sequences... strange, but allowed. if len(context['stack']) > 0 and context['stack'][-1].type == MAP: - if next.value in context['stack'][-1].keys: + if (next.value in context['stack'][-1].keys and + # `<<` is "merge key", see http://yaml.org/type/merge.html + next.value != '<<'): yield LintProblem( next.start_mark.line + 1, next.start_mark.column + 1, 'duplication of key "%s" in mapping' % next.value) diff -Nru yamllint-1.11.0/yamllint/rules/truthy.py yamllint-1.11.1/yamllint/rules/truthy.py --- yamllint-1.11.0/yamllint/rules/truthy.py 2018-02-21 12:42:06.000000000 +0000 +++ yamllint-1.11.1/yamllint/rules/truthy.py 2018-04-06 09:11:32.000000000 +0000 @@ -15,11 +15,12 @@ # along with this program. If not, see . """ -Use this rule to forbid truthy values that are not quoted nor explicitly typed. +Use this rule to forbid non-explictly typed truthy values other than ``true`` +and ``false``, for example ``YES``, ``False`` and ``off``. -This would prevent YAML parsers from transforming ``[yes, FALSE, Off]`` into -``[true, false, false]`` or ``{y: 1, yes: 2, on: 3, true: 4, True: 5}`` into -``{y: 1, true: 5}``. +This can be useful to prevent surprises from YAML parsers transforming +``[yes, FALSE, Off]`` into ``[true, false, false]`` or +``{y: 1, yes: 2, on: 3, true: 4, True: 5}`` into ``{y: 1, true: 5}``. .. rubric:: Examples @@ -34,8 +35,7 @@ "yes": 1 "on": 2 - "true": 3 - "True": 4 + "True": 3 explicit: string1: !!str True @@ -62,8 +62,7 @@ yes: 1 on: 2 - true: 3 - True: 4 + True: 3 """ import yaml @@ -90,4 +89,4 @@ if token.value in TRUTHY and token.style is None: yield LintProblem(token.start_mark.line + 1, token.start_mark.column + 1, - "truthy value is not quoted") + "truthy value should be true or false")