From: Jeremy Stanley Date: Fri, 1 Dec 2017 00:17:00 +0000 (+0000) Subject: Test sample data style with yamllint X-Git-Tag: 0.0.1~111 X-Git-Url: https://mudpy.org/gitweb?a=commitdiff_plain;h=9ed3f52a3897cb50b46a5f71c58318c415b885ec;p=mudpy.git Test sample data style with yamllint Add a tox environment and associated support for running the yamllint YAML style checking utility. This tool should be used to check all edits made to any included YAML files for ease of readability and future maintenance. It can also be used to check YAML data generated by the mudpy engine, as its output style matches the expectations of yamllint's default ruleset. One override has been added via the included .yamllint configuration file, to prevent it complaining about the extremely long PBKDF2 password hashes in account elements which can't effectively be line-wrapped when written. --- diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..f25fdf7 --- /dev/null +++ b/.yamllint @@ -0,0 +1,4 @@ +extends: default +rules: + line-length: + allow-non-breakable-inline-mappings: true diff --git a/test-requirements.txt b/test-requirements.txt index 380db49..47f4a94 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,6 @@ -# Copyright (c) 2016 Jeremy Stanley . Permission +# Copyright (c) 2016-2017 Jeremy Stanley . Permission # to use, copy, modify, and distribute this software is granted under # terms provided in the LICENSE file distributed with this software. flake8 +yamllint diff --git a/tox.ini b/tox.ini index 27668ed..b4464e2 100644 --- a/tox.ini +++ b/tox.ini @@ -4,10 +4,11 @@ [tox] minversion = 2.0 -envlist = flake8 +envlist = flake8, yamllint skipsdist = True [testenv] +basepython = python3 usedevelop = True install_command = pip install {opts} {packages} setenv = @@ -17,9 +18,11 @@ deps = -r{toxinidir}/test-requirements.txt commands = python setup.py test --slowest --testr-args='{posargs}' [testenv:flake8] -basepython=python3 commands = flake8 {posargs} +[testenv:yamllint] +commands = yamllint {posargs} . + [testenv:venv] commands = {posargs}