Hello community,

here is the log from the commit of package python-yamllint for openSUSE:Factory 
checked in at 2019-06-14 20:43:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-yamllint (Old)
 and      /work/SRC/openSUSE:Factory/.python-yamllint.new.4811 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-yamllint"

Fri Jun 14 20:43:02 2019 rev:5 rq:709965 version:1.16.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-yamllint/python-yamllint.changes  
2019-02-25 17:51:21.962752838 +0100
+++ 
/work/SRC/openSUSE:Factory/.python-yamllint.new.4811/python-yamllint.changes    
    2019-06-14 20:43:03.570325788 +0200
@@ -1,0 +2,7 @@
+Fri Jun 14 11:46:41 UTC 2019 - Marketa Calabkova <[email protected]>
+
+- Update to 1.16.0
+  * Add the allowed-values option to the truthy rule
+  * Allow configuration options to be a list of enums
+
+-------------------------------------------------------------------

Old:
----
  yamllint-1.15.0.tar.gz

New:
----
  yamllint-1.16.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-yamllint.spec ++++++
--- /var/tmp/diff_new_pack.4WeFZi/_old  2019-06-14 20:43:04.182324750 +0200
+++ /var/tmp/diff_new_pack.4WeFZi/_new  2019-06-14 20:43:04.186324743 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-yamllint
-Version:        1.15.0
+Version:        1.16.0
 Release:        0
 Summary:        A linter for YAML files
 License:        GPL-3.0-only

++++++ yamllint-1.15.0.tar.gz -> yamllint-1.16.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/PKG-INFO new/yamllint-1.16.0/PKG-INFO
--- old/yamllint-1.15.0/PKG-INFO        2019-02-11 14:22:05.000000000 +0100
+++ new/yamllint-1.16.0/PKG-INFO        2019-06-07 10:07:07.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: yamllint
-Version: 1.15.0
+Version: 1.16.0
 Summary: A linter for YAML files.
 Home-page: https://github.com/adrienverge/yamllint
 Author: Adrien Vergé
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/README.rst 
new/yamllint-1.16.0/README.rst
--- old/yamllint-1.15.0/README.rst      2018-05-31 11:06:31.000000000 +0200
+++ new/yamllint-1.16.0/README.rst      2019-03-25 17:35:46.000000000 +0100
@@ -51,6 +51,13 @@
 
  sudo apt-get install yamllint
 
+On FreeBSD:
+
+.. code:: sh
+
+  pkg install py27-yamllint
+  pkg install py36-yamllint
+
 On Mac OS 10.11+:
 
 .. code:: bash
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/setup.py new/yamllint-1.16.0/setup.py
--- old/yamllint-1.15.0/setup.py        2019-01-11 12:00:07.000000000 +0100
+++ new/yamllint-1.16.0/setup.py        2019-06-06 09:52:15.000000000 +0200
@@ -14,7 +14,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-from setuptools import setup, find_packages
+from setuptools import find_packages, setup
 
 from yamllint import (__author__, __license__,
                       APP_NAME, APP_VERSION, APP_DESCRIPTION)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/tests/rules/test_empty_lines.py 
new/yamllint-1.16.0/tests/rules/test_empty_lines.py
--- old/yamllint-1.15.0/tests/rules/test_empty_lines.py 2017-02-06 
14:21:06.000000000 +0100
+++ new/yamllint-1.16.0/tests/rules/test_empty_lines.py 2019-04-09 
16:48:10.000000000 +0200
@@ -78,3 +78,22 @@
                 'document-start: disable\n')
         self.check('non empty\n', conf)
         self.check('non empty\n\n', conf, problem=(2, 1))
+
+    def test_with_dos_newlines(self):
+        conf = ('empty-lines: {max: 2, max-start: 0, max-end: 0}\n'
+                'new-lines: {type: dos}\n'
+                'document-start: disable\n')
+        self.check('---\r\n', conf)
+        self.check('---\r\ntext\r\n\r\ntext\r\n', conf)
+        self.check('\r\n---\r\ntext\r\n\r\ntext\r\n', conf,
+                   problem=(1, 1))
+        self.check('\r\n\r\n\r\n---\r\ntext\r\n\r\ntext\r\n', conf,
+                   problem=(3, 1))
+        self.check('---\r\ntext\r\n\r\n\r\n\r\ntext\r\n', conf,
+                   problem=(5, 1))
+        self.check('---\r\ntext\r\n\r\n\r\n\r\n\r\n\r\n\r\ntext\r\n', conf,
+                   problem=(8, 1))
+        self.check('---\r\ntext\r\n\r\ntext\r\n\r\n', conf,
+                   problem=(5, 1))
+        self.check('---\r\ntext\r\n\r\ntext\r\n\r\n\r\n\r\n', conf,
+                   problem=(7, 1))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/tests/rules/test_line_length.py 
new/yamllint-1.16.0/tests/rules/test_line_length.py
--- old/yamllint-1.15.0/tests/rules/test_line_length.py 2019-01-11 
12:00:07.000000000 +0100
+++ new/yamllint-1.16.0/tests/rules/test_line_length.py 2019-04-09 
16:48:10.000000000 +0200
@@ -171,3 +171,12 @@
                    '# This is a test to check if “line-length” works nice\n'
                    'with: “unicode characters” that span accross bytes! ↺\n',
                    conf, problem1=(2, 53), problem2=(3, 53))
+
+    def test_with_dos_newlines(self):
+        conf = ('line-length: {max: 10}\n'
+                'new-lines: {type: dos}\n'
+                'new-line-at-end-of-file: disable\n')
+        self.check('---\r\nABCD EFGHI', conf)
+        self.check('---\r\nABCD EFGHI\r\n', conf)
+        self.check('---\r\nABCD EFGHIJ', conf, problem=(2, 11))
+        self.check('---\r\nABCD EFGHIJ\r\n', conf, problem=(2, 11))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/tests/rules/test_new_lines.py 
new/yamllint-1.16.0/tests/rules/test_new_lines.py
--- old/yamllint-1.15.0/tests/rules/test_new_lines.py   2017-02-06 
14:21:06.000000000 +0100
+++ new/yamllint-1.16.0/tests/rules/test_new_lines.py   2019-04-09 
16:48:10.000000000 +0200
@@ -31,16 +31,20 @@
         self.check('---\r\ntext\r\n', conf)
 
     def test_unix_type(self):
-        conf = 'new-lines: {type: unix}'
+        conf = ('new-line-at-end-of-file: disable\n'
+                'new-lines: {type: unix}\n')
         self.check('', conf)
+        self.check('\r', conf)
         self.check('\n', conf)
         self.check('\r\n', conf, problem=(1, 1))
         self.check('---\ntext\n', conf)
         self.check('---\r\ntext\r\n', conf, problem=(1, 4))
 
     def test_dos_type(self):
-        conf = 'new-lines: {type: dos}\n'
+        conf = ('new-line-at-end-of-file: disable\n'
+                'new-lines: {type: dos}\n')
         self.check('', conf)
+        self.check('\r', conf)
         self.check('\n', conf, problem=(1, 1))
         self.check('\r\n', conf)
         self.check('---\ntext\n', conf, problem=(1, 4))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/tests/rules/test_truthy.py 
new/yamllint-1.16.0/tests/rules/test_truthy.py
--- old/yamllint-1.15.0/tests/rules/test_truthy.py      2017-02-06 
14:21:06.000000000 +0100
+++ new/yamllint-1.16.0/tests/rules/test_truthy.py      2019-06-07 
09:59:31.000000000 +0200
@@ -49,6 +49,54 @@
                    problem3=(7, 3), problem4=(7, 7),
                    problem5=(8, 3), problem6=(8, 7))
 
+    def test_different_allowed_values(self):
+        conf = ('truthy:\n'
+                '  allowed-values: ["yes", "no"]\n')
+        self.check('---\n'
+                   'key1: foo\n'
+                   'key2: yes\n'
+                   'key3: bar\n'
+                   'key4: no\n', conf)
+        self.check('---\n'
+                   'key1: true\n'
+                   'key2: Yes\n'
+                   'key3: false\n'
+                   'key4: no\n'
+                   'key5: yes\n',
+                   conf,
+                   problem1=(2, 7), problem2=(3, 7),
+                   problem3=(4, 7))
+
+    def test_combined_allowed_values(self):
+        conf = ('truthy:\n'
+                '  allowed-values: ["yes", "no", "true", "false"]\n')
+        self.check('---\n'
+                   'key1: foo\n'
+                   'key2: yes\n'
+                   'key3: bar\n'
+                   'key4: no\n', conf)
+        self.check('---\n'
+                   'key1: true\n'
+                   'key2: Yes\n'
+                   'key3: false\n'
+                   'key4: no\n'
+                   'key5: yes\n',
+                   conf, problem1=(3, 7))
+
+    def test_no_allowed_values(self):
+        conf = ('truthy:\n'
+                '  allowed-values: []\n')
+        self.check('---\n'
+                   'key1: foo\n'
+                   'key2: bar\n', conf)
+        self.check('---\n'
+                   'key1: true\n'
+                   'key2: yes\n'
+                   'key3: false\n'
+                   'key4: no\n', conf,
+                   problem1=(2, 7), problem2=(3, 7),
+                   problem3=(4, 7), problem4=(5, 7))
+
     def test_explicit_types(self):
         conf = 'truthy: enable\n'
         self.check('---\n'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/tests/test_config.py 
new/yamllint-1.16.0/tests/test_config.py
--- old/yamllint-1.15.0/tests/test_config.py    2019-01-11 12:00:07.000000000 
+0100
+++ new/yamllint-1.16.0/tests/test_config.py    2019-06-07 09:59:31.000000000 
+0200
@@ -174,6 +174,25 @@
         self.assertRaises(config.YamlLintConfigError,
                           config.validate_rule_conf, Rule, {'choice': 'abc'})
 
+        Rule.CONF = {'multiple': ['item1', 'item2', 'item3']}
+        Rule.DEFAULT = {'multiple': ['item1']}
+        config.validate_rule_conf(Rule, {'multiple': []})
+        config.validate_rule_conf(Rule, {'multiple': ['item2']})
+        config.validate_rule_conf(Rule, {'multiple': ['item2', 'item3']})
+        config.validate_rule_conf(Rule, {})
+        self.assertRaises(config.YamlLintConfigError,
+                          config.validate_rule_conf, Rule,
+                          {'multiple': 'item1'})
+        self.assertRaises(config.YamlLintConfigError,
+                          config.validate_rule_conf, Rule,
+                          {'multiple': ['']})
+        self.assertRaises(config.YamlLintConfigError,
+                          config.validate_rule_conf, Rule,
+                          {'multiple': ['item1', 4]})
+        self.assertRaises(config.YamlLintConfigError,
+                          config.validate_rule_conf, Rule,
+                          {'multiple': ['item4']})
+
 
 class ExtendedConfigTestCase(unittest.TestCase):
     def test_extend_on_object(self):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/yamllint/__init__.py 
new/yamllint-1.16.0/yamllint/__init__.py
--- old/yamllint-1.15.0/yamllint/__init__.py    2019-02-11 14:17:02.000000000 
+0100
+++ new/yamllint-1.16.0/yamllint/__init__.py    2019-06-07 10:00:12.000000000 
+0200
@@ -22,7 +22,7 @@
 
 
 APP_NAME = 'yamllint'
-APP_VERSION = '1.15.0'
+APP_VERSION = '1.16.0'
 APP_DESCRIPTION = __doc__
 
 __author__ = u'Adrien Vergé'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/yamllint/cli.py 
new/yamllint-1.16.0/yamllint/cli.py
--- old/yamllint-1.15.0/yamllint/cli.py 2019-02-11 14:10:28.000000000 +0100
+++ new/yamllint-1.16.0/yamllint/cli.py 2019-06-06 09:52:15.000000000 +0200
@@ -16,15 +16,15 @@
 
 from __future__ import print_function
 
+import argparse
 import os
-import sys
 import platform
-import argparse
+import sys
 
 from yamllint import APP_DESCRIPTION, APP_NAME, APP_VERSION
+from yamllint import linter
 from yamllint.config import YamlLintConfig, YamlLintConfigError
 from yamllint.linter import PROBLEM_LEVELS
-from yamllint import linter
 
 
 def find_files_recursively(items):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/yamllint/config.py 
new/yamllint-1.16.0/yamllint/config.py
--- old/yamllint-1.15.0/yamllint/config.py      2019-01-11 12:00:07.000000000 
+0100
+++ new/yamllint-1.16.0/yamllint/config.py      2019-06-07 09:59:31.000000000 
+0200
@@ -134,12 +134,26 @@
                 raise YamlLintConfigError(
                     'invalid config: unknown option "%s" for rule "%s"' %
                     (optkey, rule.ID))
+            # Example: CONF = {option: (bool, 'mixed')}
+            #          → {option: true}         → {option: mixed}
             if isinstance(options[optkey], tuple):
                 if (conf[optkey] not in options[optkey] and
                         type(conf[optkey]) not in options[optkey]):
                     raise YamlLintConfigError(
                         'invalid config: option "%s" of "%s" should be in %s'
                         % (optkey, rule.ID, options[optkey]))
+            # Example: CONF = {option: ['flag1', 'flag2']}
+            #          → {option: [flag1]}      → {option: [flag1, flag2]}
+            elif isinstance(options[optkey], list):
+                if (type(conf[optkey]) is not list or
+                        any(flag not in options[optkey]
+                            for flag in conf[optkey])):
+                    raise YamlLintConfigError(
+                        ('invalid config: option "%s" of "%s" should only '
+                         'contain values in %s')
+                        % (optkey, rule.ID, str(options[optkey])))
+            # Example: CONF = {option: int}
+            #          → {option: 42}
             else:
                 if not isinstance(conf[optkey], options[optkey]):
                     raise YamlLintConfigError(
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/yamllint/parser.py 
new/yamllint-1.16.0/yamllint/parser.py
--- old/yamllint-1.15.0/yamllint/parser.py      2018-05-31 11:02:35.000000000 
+0200
+++ new/yamllint-1.16.0/yamllint/parser.py      2019-04-09 16:48:10.000000000 
+0200
@@ -77,7 +77,10 @@
     cur = 0
     next = buffer.find('\n')
     while next != -1:
-        yield Line(line_no, buffer, start=cur, end=next)
+        if next > 0 and buffer[next - 1] == '\r':
+            yield Line(line_no, buffer, start=cur, end=next - 1)
+        else:
+            yield Line(line_no, buffer, start=cur, end=next)
         cur = next + 1
         next = buffer.find('\n', cur)
         line_no += 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/yamllint/rules/colons.py 
new/yamllint-1.16.0/yamllint/rules/colons.py
--- old/yamllint-1.15.0/yamllint/rules/colons.py        2019-01-11 
12:00:07.000000000 +0100
+++ new/yamllint-1.16.0/yamllint/rules/colons.py        2019-06-06 
09:52:15.000000000 +0200
@@ -72,7 +72,7 @@
 
 import yaml
 
-from yamllint.rules.common import spaces_after, spaces_before, is_explicit_key
+from yamllint.rules.common import is_explicit_key, spaces_after, spaces_before
 
 
 ID = 'colons'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/yamllint/rules/empty_lines.py 
new/yamllint-1.16.0/yamllint/rules/empty_lines.py
--- old/yamllint-1.15.0/yamllint/rules/empty_lines.py   2019-01-11 
12:00:07.000000000 +0100
+++ new/yamllint-1.16.0/yamllint/rules/empty_lines.py   2019-04-09 
16:48:10.000000000 +0200
@@ -66,27 +66,37 @@
 def check(conf, line):
     if line.start == line.end and line.end < len(line.buffer):
         # Only alert on the last blank line of a series
-        if (line.end < len(line.buffer) - 1 and
-                line.buffer[line.end + 1] == '\n'):
+        if (line.end + 2 <= len(line.buffer) and
+                line.buffer[line.end:line.end + 2] == '\n\n'):
+            return
+        elif (line.end + 4 <= len(line.buffer) and
+              line.buffer[line.end:line.end + 4] == '\r\n\r\n'):
             return
 
         blank_lines = 0
 
-        while (line.start > blank_lines and
-               line.buffer[line.start - blank_lines - 1] == '\n'):
+        start = line.start
+        while start >= 2 and line.buffer[start - 2:start] == '\r\n':
+            blank_lines += 1
+            start -= 2
+        while start >= 1 and line.buffer[start - 1] == '\n':
             blank_lines += 1
+            start -= 1
 
         max = conf['max']
 
         # Special case: start of document
-        if line.start - blank_lines == 0:
+        if start == 0:
             blank_lines += 1  # first line doesn't have a preceding \n
             max = conf['max-start']
 
         # Special case: end of document
         # NOTE: The last line of a file is always supposed to end with a new
         # line. See POSIX definition of a line at:
-        if line.end == len(line.buffer) - 1 and line.buffer[line.end] == '\n':
+        if ((line.end == len(line.buffer) - 1 and
+             line.buffer[line.end] == '\n') or
+            (line.end == len(line.buffer) - 2 and
+             line.buffer[line.end:line.end + 2] == '\r\n')):
             # Allow the exception of the one-byte file containing '\n'
             if line.end == 0:
                 return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/yamllint/rules/indentation.py 
new/yamllint-1.16.0/yamllint/rules/indentation.py
--- old/yamllint-1.15.0/yamllint/rules/indentation.py   2019-01-11 
12:00:07.000000000 +0100
+++ new/yamllint-1.16.0/yamllint/rules/indentation.py   2019-06-06 
09:52:15.000000000 +0200
@@ -193,7 +193,7 @@
 import yaml
 
 from yamllint.linter import LintProblem
-from yamllint.rules.common import is_explicit_key, get_real_end_line
+from yamllint.rules.common import get_real_end_line, is_explicit_key
 
 
 ID = 'indentation'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/yamllint/rules/new_lines.py 
new/yamllint-1.16.0/yamllint/rules/new_lines.py
--- old/yamllint-1.15.0/yamllint/rules/new_lines.py     2019-01-11 
12:00:07.000000000 +0100
+++ new/yamllint-1.16.0/yamllint/rules/new_lines.py     2019-04-09 
16:48:10.000000000 +0200
@@ -36,10 +36,11 @@
 def check(conf, line):
     if line.start == 0 and len(line.buffer) > line.end:
         if conf['type'] == 'dos':
-            if line.buffer[line.end - 1:line.end + 1] != '\r\n':
+            if (line.end + 2 > len(line.buffer) or
+                    line.buffer[line.end:line.end + 2] != '\r\n'):
                 yield LintProblem(1, line.end - line.start + 1,
                                   'wrong new line character: expected \\r\\n')
         else:
-            if line.end > 0 and line.buffer[line.end - 1] == '\r':
-                yield LintProblem(1, line.end - line.start,
+            if line.buffer[line.end] == '\r':
+                yield LintProblem(1, line.end - line.start + 1,
                                   'wrong new line character: expected \\n')
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/yamllint/rules/truthy.py 
new/yamllint-1.16.0/yamllint/rules/truthy.py
--- old/yamllint-1.15.0/yamllint/rules/truthy.py        2019-01-11 
12:00:07.000000000 +0100
+++ new/yamllint-1.16.0/yamllint/rules/truthy.py        2019-06-07 
09:59:31.000000000 +0200
@@ -15,13 +15,22 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 """
-Use this rule to forbid non-explictly typed truthy values other than ``true``
-and ``false``, for example ``YES``, ``False`` and ``off``.
+Use this rule to forbid non-explictly typed truthy values other than allowed
+ones (by default: ``true`` and ``false``), for example ``YES`` or ``off``.
 
 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:: Options
+
+* ``allowed-values`` defines the list of truthy values which will be ignored
+  during linting. The default is ``['true', 'false']``, but can be changed to
+  any list containing: ``'TRUE'``, ``'True'``,  ``'true'``, ``'FALSE'``,
+  ``'False'``, ``'false'``, ``'YES'``, ``'Yes'``, ``'yes'``, ``'NO'``,
+  ``'No'``, ``'no'``, ``'ON'``, ``'On'``, ``'on'``, ``'OFF'``, ``'Off'``,
+  ``'off'``.
+
 .. rubric:: Examples
 
 #. With ``truthy: {}``
@@ -63,29 +72,55 @@
     yes:  1
     on:   2
     True: 3
+
+#. With ``truthy: {allowed-values: ["yes", "no"]}``
+
+   the following code snippet would **PASS**:
+   ::
+
+    - yes
+    - no
+    - "true"
+    - 'false'
+    - foo
+    - bar
+
+   the following code snippet would **FAIL**:
+   ::
+
+    - true
+    - false
+    - on
+    - off
 """
 
 import yaml
 
 from yamllint.linter import LintProblem
 
-ID = 'truthy'
-TYPE = 'token'
 
 TRUTHY = ['YES', 'Yes', 'yes',
           'NO', 'No', 'no',
-          'TRUE', 'True',  # 'true' is a boolean
-          'FALSE', 'False',  # 'false' is a boolean
+          'TRUE', 'True',  'true',
+          'FALSE', 'False', 'false',
           'ON', 'On', 'on',
           'OFF', 'Off', 'off']
 
 
+ID = 'truthy'
+TYPE = 'token'
+CONF = {'allowed-values': list(TRUTHY)}
+DEFAULT = {'allowed-values': ['true', 'false']}
+
+
 def check(conf, token, prev, next, nextnext, context):
     if prev and isinstance(prev, yaml.tokens.TagToken):
         return
 
     if isinstance(token, yaml.tokens.ScalarToken):
-        if token.value in TRUTHY and token.style is None:
+        if (token.value in (set(TRUTHY) - set(conf['allowed-values'])) and
+                token.style is None):
             yield LintProblem(token.start_mark.line + 1,
                               token.start_mark.column + 1,
-                              "truthy value should be true or false")
+                              "truthy value should be one of [" +
+                              ", ".join(sorted(conf['allowed-values'])) + "]")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yamllint-1.15.0/yamllint.egg-info/PKG-INFO 
new/yamllint-1.16.0/yamllint.egg-info/PKG-INFO
--- old/yamllint-1.15.0/yamllint.egg-info/PKG-INFO      2019-02-11 
14:22:05.000000000 +0100
+++ new/yamllint-1.16.0/yamllint.egg-info/PKG-INFO      2019-06-07 
10:07:07.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: yamllint
-Version: 1.15.0
+Version: 1.16.0
 Summary: A linter for YAML files.
 Home-page: https://github.com/adrienverge/yamllint
 Author: Adrien Vergé


Reply via email to