You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible/test/sanity
John R Barker 1c61b9bae7 Split modules/network into two parts (#24024)
* Split modules/network into two parts

Given the dedicated team we we have working on Ansible Networking a
clearer split is needed between Networking modules and "things that
happen to use the network"

* nmcli to net_tools

* nmcli moved
8 years ago
..
ansible-doc
code-smell Fix bugs in ansible-test units command. (#24044) 8 years ago
pep8 Split modules/network into two parts (#24024) 8 years ago
pylint
rstcheck
shellcheck
validate-modules
README.rst

README.rst

Sanity Tests
============

Sanity tests are made up of scripts and tools used to perform static code analysis.
The primary purpose of these tests is to enforce Ansible coding standards and requirements.

Tests are run with ``ansible-test sanity``.
All available tests are run unless the ``--test`` option is used.

Available Tests
===============

Tests can be listed with ``ansible-test sanity --list-tests``.

This list is a combination of two different categories of tests.

Code Smell Tests
----------------

Miscellaneous `scripts <code-smell/>`_ used for enforcing coding standards and requirements, identifying trip hazards, etc.

    These tests are listed and accessed by script name. There is no actual test named ``code-smell``.

All executable scripts added to the ``code-smell`` directory are automatically detected and executed by ``ansible-test``.

Scripts in the directory which fail can be skipped by adding them to `skip.txt <code-smell/skip.txt>`_.
This is useful for scripts which identify issues that have not yet been resolved in the code base.

Files tested are specific to the individual test scripts and are not affected by command line arguments.

Built-in Tests
--------------

These tests are integrated directly into ``ansible-test``.
All files relevant to each test are tested unless specific files are specified.

ansible-doc
~~~~~~~~~~~

Verifies that ``ansible-doc`` can parse module documentation on all supported python versions.

pep8
~~~~

Python static analysis for PEP 8 style guideline compliance.

pylint
~~~~~~

Python static analysis for common programming errors.

rstcheck
~~~~~~~~

Check reStructuredText files for syntax and formatting issues.

shellcheck
~~~~~~~~~~

Static code analysis for shell scripts using the excellent `shellcheck <https://www.shellcheck.net/>`_ tool.

validate-modules
~~~~~~~~~~~~~~~~

Analyze modules for common issues in code and documentation.

yamllint
~~~~~~~~

Check YAML files for syntax and formatting issues.