Index | index by Group | index by Distribution | index by Vendor | index by creation date | index by Name | Mirrors | Help | Search |
Name: salt-lint | Distribution: openSUSE Tumbleweed |
Version: 0.9.2 | Vendor: openSUSE |
Release: 1.4 | Build date: Wed Jun 14 14:47:46 2023 |
Group: Development/Languages/Python | Build host: reproducible |
Size: 223522 | Source RPM: salt-lint-0.9.2-1.4.src.rpm |
Packager: https://bugs.opensuse.org | |
Url: https://github.com/warpnet/salt-lint | |
Summary: A command-line utility that checks for best practices in SaltStack |
.. image:: https://img.shields.io/pypi/v/salt-lint.svg?style=for-the-badge :target: https://pypi.org/project/salt-lint :alt: PyPI .. image:: https://img.shields.io/travis/roaldnefs/salt-lint.svg?style=for-the-badge :target: https://travis-ci.org/roaldnefs/salt-lint :alt: Travis (.org) .. image:: https://img.shields.io/coveralls/github/roaldnefs/salt-lint.svg?style=for-the-badge :target: https://coveralls.io/github/roaldnefs/salt-lint :alt: Coveralls Salt-lint ========= ``salt-lint`` checks Salt state files (SLS) for practices and behavior that could potentially be improved. The project is heavily based on `ansible-lint`_, which was created by `Will Thames`_ and is now maintained as part of the `Ansible`_ by `Red Hat`_ project. Installing ========== Using Pip --------- .. code-block:: bash pip install salt-lint From Source ----------- .. code-block:: bash pip install git+https://github.com/roaldnefs/salt-lint.git Usage ===== Command Line Options -------------------- The following is the output from ``salt-lint --help``, providing an overview of the basic command line options: .. code-block:: bash Usage: salt-lint [options] init.sls [state ...] Options: --version show program's version number and exit -h, --help show this help message and exit -L list all the rules -r RULESDIR specify one or more rules directories using one or more -r arguments. Any -r flags override the default rules in /tmp/saltlint/lib/saltlint/rules, unless -R is also used. -R Use default rules in /tmp/saltlint/lib/saltlint/rules in addition to any extra rules directories specified with -r. There is no need to specify this if no -r flags are used. -t TAGS only check rules whose id/tags match these values -T list all the tags -v Increase verbosity level -x SKIP_LIST only check rules whose id/tags do not match these values --nocolor disable colored output --force-color Try force colored output (relying on salt's code) --exclude=EXCLUDE_PATHS path to directories or files to skip. This option is repeatable. -c C Specify configuration file to use. Defaults to ".salt-lint" Linting Salt state files ------------------------ It's important to note that ``salt-lint`` accepts a list of Salt state files or a list of directories. GitHub Action ------------- Salt-lint is available on the GitHub `marketplace`_ as a GitHub Action. The `salt-lint-action`_ allows you to run ``salt-lint`` with no additional options. To use the action simply add the following lines to your ``.github/workflows/main.yml``. .. code-block:: yaml on: [push] jobs: test: runs-on: ubuntu-latest name: Salt Lint Action steps: - uses: actions/checkout@v1 - name: Run salt-lint uses: roaldnefs/salt-lint-action@master env: ACTION_STATE_NAME: init.sls Configuring =========== Configuration File ------------------ Salt-lint supports local configuration via a ``.salt-lint`` configuration file. Salt-lint checks the working directory for the presence of this file and applies any configuration found there. The configuration file location can also be overridden via the ``-c path/to/file`` CLI flag. If a value is provided on both the command line and via a configuration file, the values will be merged (if a list like **exclude_paths**), or the **True** value will be preferred, in the case of something like **quiet**. The following values are supported, and function identically to their CLI counterparts: .. code-block:: yaml --- exclude_paths: - exclude_this_file - exclude_this_directory/ - exclude/this/sub-directory/ skip_list: - 207 - 208 tags: - formatting verbosity: 1 Pre-commit Setup ---------------- To use salt-lint with `pre-commit`_, just add the following to your local repo's ``.pre-commit-config.yaml`` file. Prior to version 0.12.0 of `pre-commit`_ the file was ``hooks.yaml`` (now ``.pre-commit-config.yaml``). .. code-block:: yaml --- - id: salt-lint name: Salt-lint description: This hook runs salt-lint. entry: salt-lint language: python files: \.(sls)$ Rules ===== False Positives: Skipping Rules ------------------------------- Some rules are bit of a rule of thumb. To skip a specific rule for a specific task, inside your state add ``# noqa [rule_id]`` at the end of the line. You can skip multiple rules via a space-separated list. Example: .. code-block:: yaml /tmp/testfile: file.managed: - source: salt://{{unspaced_var}}/example # noqa: 206 Authors ======= salt-lint is heavily based on `ansible-lint`_ with the modified work by `Roald Nefs`_. `ansible-lint`_ was created by `Will Thames`_ and is now maintained as part of the `Ansible`_ by `Red Hat`_ project. .. _pre-commit: https://pre-commit.com .. _ansible-lint: https://github.com/ansible/ansible-lint .. _Roald Nefs: https://github.com/roaldnefs .. _Will Thames: https://github.com/willthames .. _Ansible: https://ansible.com .. _Red Hat: https://redhat.com .. _marketplace: https://github.com/marketplace/actions/salt-lint .. _salt-lint-action: https://github.com/roaldnefs/salt-lint-action
MIT
* Wed Jun 14 2023 Dominik Heidler <dheidler@suse.de> - update to 0.9.2 - Ensure version identification adheres to PEP440 (!304) - Revert changes to rule 210 (!299) - Rule 219 for catching missing over-indentation of nested dicts (#284). - Add Python 3.11 support (#290). - Add alternative typos of onchanges in rule 216 (#286). * Mon Apr 25 2022 Marcus Rueckert <mrueckert@suse.de> - update to 0.8.0 - make the package only build with the default python version
/usr/bin/salt-lint /usr/lib/python3.11/site-packages/salt_lint-0.9.2-py3.11.egg-info /usr/lib/python3.11/site-packages/salt_lint-0.9.2-py3.11.egg-info/PKG-INFO /usr/lib/python3.11/site-packages/salt_lint-0.9.2-py3.11.egg-info/SOURCES.txt /usr/lib/python3.11/site-packages/salt_lint-0.9.2-py3.11.egg-info/dependency_links.txt /usr/lib/python3.11/site-packages/salt_lint-0.9.2-py3.11.egg-info/entry_points.txt /usr/lib/python3.11/site-packages/salt_lint-0.9.2-py3.11.egg-info/not-zip-safe /usr/lib/python3.11/site-packages/salt_lint-0.9.2-py3.11.egg-info/requires.txt /usr/lib/python3.11/site-packages/salt_lint-0.9.2-py3.11.egg-info/top_level.txt /usr/lib/python3.11/site-packages/saltlint /usr/lib/python3.11/site-packages/saltlint/__init__.py /usr/lib/python3.11/site-packages/saltlint/__main__.py /usr/lib/python3.11/site-packages/saltlint/__pycache__ /usr/lib/python3.11/site-packages/saltlint/__pycache__/__init__.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/__pycache__/__init__.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/__pycache__/__main__.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/__pycache__/__main__.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/__pycache__/cli.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/__pycache__/cli.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/__pycache__/config.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/__pycache__/config.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/__pycache__/utils.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/__pycache__/utils.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/cli.py /usr/lib/python3.11/site-packages/saltlint/config.py /usr/lib/python3.11/site-packages/saltlint/formatters /usr/lib/python3.11/site-packages/saltlint/formatters/__init__.py /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__ /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__/__init__.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__/__init__.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__/base.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__/base.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__/default.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__/default.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__/json.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__/json.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__/severity.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/formatters/__pycache__/severity.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/formatters/base.py /usr/lib/python3.11/site-packages/saltlint/formatters/default.py /usr/lib/python3.11/site-packages/saltlint/formatters/json.py /usr/lib/python3.11/site-packages/saltlint/formatters/severity.py /usr/lib/python3.11/site-packages/saltlint/linter /usr/lib/python3.11/site-packages/saltlint/linter/__init__.py /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__ /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__/__init__.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__/__init__.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__/collection.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__/collection.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__/match.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__/match.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__/rule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__/rule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__/runner.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/linter/__pycache__/runner.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/linter/collection.py /usr/lib/python3.11/site-packages/saltlint/linter/match.py /usr/lib/python3.11/site-packages/saltlint/linter/rule.py /usr/lib/python3.11/site-packages/saltlint/linter/runner.py /usr/lib/python3.11/site-packages/saltlint/rules /usr/lib/python3.11/site-packages/saltlint/rules/CmdRunQuietRule.py /usr/lib/python3.11/site-packages/saltlint/rules/CmdWaitRecommendRule.py /usr/lib/python3.11/site-packages/saltlint/rules/FileExtensionRule.py /usr/lib/python3.11/site-packages/saltlint/rules/FileModeLeadingZeroRule.py /usr/lib/python3.11/site-packages/saltlint/rules/FileModeQuotationRule.py /usr/lib/python3.11/site-packages/saltlint/rules/JinjaCommentHasSpacesRule.py /usr/lib/python3.11/site-packages/saltlint/rules/JinjaPillarGrainsGetFormatRule.py /usr/lib/python3.11/site-packages/saltlint/rules/JinjaStatementHasSpacesRule.py /usr/lib/python3.11/site-packages/saltlint/rules/JinjaVariableHasSpacesRule.py /usr/lib/python3.11/site-packages/saltlint/rules/LineTooLongRule.py /usr/lib/python3.11/site-packages/saltlint/rules/NestedDictRule.py /usr/lib/python3.11/site-packages/saltlint/rules/NoIrregularSpacesRule.py /usr/lib/python3.11/site-packages/saltlint/rules/NoTabsRule.py /usr/lib/python3.11/site-packages/saltlint/rules/SLSFileNameRule.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationDockerAbsent.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationDockerImageAbsent.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationDockerImagePresent.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationDockerModWatch.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationDockerNetworkAbsent.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationDockerNetworkPresent.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationDockerRunning.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationDockerStopped.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationDockerVolumeAbsent.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationDockerVolumePresent.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationElasticsearchIndexRule.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationVirtRevertedRule.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationVirtSavedRule.py /usr/lib/python3.11/site-packages/saltlint/rules/StateDeprecationVirtUnpoweredRule.py /usr/lib/python3.11/site-packages/saltlint/rules/TrailingWhitespaceRule.py /usr/lib/python3.11/site-packages/saltlint/rules/TypoOnchangesRule.py /usr/lib/python3.11/site-packages/saltlint/rules/TypoRequireRule.py /usr/lib/python3.11/site-packages/saltlint/rules/YamlHasOctalValueRule.py /usr/lib/python3.11/site-packages/saltlint/rules/__init__.py /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__ /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/CmdRunQuietRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/CmdRunQuietRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/CmdWaitRecommendRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/CmdWaitRecommendRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/FileExtensionRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/FileExtensionRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/FileModeLeadingZeroRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/FileModeLeadingZeroRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/FileModeQuotationRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/FileModeQuotationRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/JinjaCommentHasSpacesRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/JinjaCommentHasSpacesRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/JinjaPillarGrainsGetFormatRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/JinjaPillarGrainsGetFormatRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/JinjaStatementHasSpacesRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/JinjaStatementHasSpacesRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/JinjaVariableHasSpacesRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/JinjaVariableHasSpacesRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/LineTooLongRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/LineTooLongRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/NestedDictRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/NestedDictRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/NoIrregularSpacesRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/NoIrregularSpacesRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/NoTabsRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/NoTabsRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/SLSFileNameRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/SLSFileNameRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerAbsent.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerAbsent.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerImageAbsent.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerImageAbsent.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerImagePresent.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerImagePresent.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerModWatch.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerModWatch.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerNetworkAbsent.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerNetworkAbsent.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerNetworkPresent.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerNetworkPresent.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerRunning.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerRunning.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerStopped.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerStopped.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerVolumeAbsent.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerVolumeAbsent.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerVolumePresent.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationDockerVolumePresent.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationElasticsearchIndexRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationElasticsearchIndexRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationVirtRevertedRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationVirtRevertedRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationVirtSavedRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationVirtSavedRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationVirtUnpoweredRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/StateDeprecationVirtUnpoweredRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/TrailingWhitespaceRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/TrailingWhitespaceRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/TypoOnchangesRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/TypoOnchangesRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/TypoRequireRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/TypoRequireRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/YamlHasOctalValueRule.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/YamlHasOctalValueRule.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/__init__.cpython-311.opt-1.pyc /usr/lib/python3.11/site-packages/saltlint/rules/__pycache__/__init__.cpython-311.pyc /usr/lib/python3.11/site-packages/saltlint/utils.py /usr/share/doc/packages/salt-lint /usr/share/doc/packages/salt-lint/CHANGELOG.md /usr/share/doc/packages/salt-lint/CODE_OF_CONDUCT.md /usr/share/doc/packages/salt-lint/README.md /usr/share/licenses/salt-lint /usr/share/licenses/salt-lint/LICENSE /usr/share/licenses/salt-lint/LICENSE.ansible-lint
Generated by rpm2html 1.8.1
Fabrice Bellet, Wed Dec 25 23:02:57 2024