Commit Graph

7 Commits

Author SHA1 Message Date
Sorin Sbarnea 0eaa5cf59a Upgrade ansible-lint to 5.0
- bumps ansible-lint to 5.0
- updates our custom rules to make them compatible with 5.0
- replace custom module mocking with native ansible-lint ones
- remove custom call of ansible-playbook --syntax-check as now this
  is done by ansible-lint
- assured molecule vars are hosted under a vars/ folder in order to
  avoid confusing linter detection.
- replaced custom rule for loop var names in role as now this this an
  optional core feature of the linter (see config)
- replaced custom rule no-same-owner with opt-in one (see config)

Change-Id: I233fae8c9036d295968a97ee80e07fde8846c633
2021-03-17 15:44:43 +00:00
Tobias Henkel 99ea9c94a0
Add test cases for tox line comment parsing
Tox line comment parsing had a few side effects at first so add
testing to it.

Change-Id: I9eb2aa00d6e467bd170fad80598728aec6949ee6
2020-04-03 19:34:24 +02:00
Mohammed Naser 23236c12fa golangci-lint: add job
This patch adds a roles and jobs to run golangci-lint against a
a Golang project.  It's a very popular tool for linting go code.

It also adds a simple framework which allows us to create dynamic
tests for file comments by defining a simple YAML file.

Change-Id: Ic8358541adaf7c3279383f0279cd3da7b446a6e0
2020-04-01 17:30:55 -04:00
Monty Taylor c800638473 Use a zuul_* and add an .ansible-lint file
ansible-lint now supports settings in a file, including exclude_paths.
This lets us simplfy the ansible-lint command. Also, stop installing
zuul and just use a fake zuul_return and zuul_console
to fake out ansible-lint.

Change-Id: I1482a9ab915cec2d45695b60cdbeb93d58cb392c
2020-03-13 20:26:06 +01:00
James E. Blair 1548d82ffd Add a python unit test framework
Add a unit testing framework for python roles.  Thanks to Matthew
Treinish for the suggestion of how to perform discovery (and much of the
code which is copied from Tempest).

Change-Id: Iec95dd1026a41614def57c65c3faa0516a682a5a
2018-07-25 09:11:25 -07:00
Paul Belanger 8e812f1eb4
Include ansible-playbook syntax-check for tox pep8
Syntax check our playbooks / roles when we run pep8. This way we can
quickly tests if our playbooks are valid.

Change-Id: Id9b44216820a2b0702e1cfa46cd7603c89ed40d3
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-17 16:53:55 -04:00
Paul Belanger 829297c37a
Ensure we load roles for linting
Did didn't have ansible-lint setup properly, as a results our roles
weren't actually linted properly.

Fix variable linting issues and ignore ANSIBLE0012.

Change-Id: I07aa940245e700c9f08df0f1920720f0ed9d3de0
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-07-17 16:50:06 -04:00