tox-lint

Runs configured tox lint environments on Ansible collections and Python projects.

8|7|Updated Feb 14, 2023
One-click install
npx skills add https://github.com/eclipse-slm/slm --skill tox-lint-eclipse-slm
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tox-lint
Source: https://github.com/eclipse-slm/slm/tree/main/.agents/skills/tox-lint
Command: npx skills add https://github.com/eclipse-slm/slm --skill tox-lint-eclipse-slm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tox, and includes scripts (resource) components.

What problem does it solve? Manually running multiple Python and Ansible linters before commits or releases is error-prone and inconsistent, often causing CI failures that could have been caught locally. ## Core Features & Use Cases - Automatic tox configuration detection: Detects lint labels, linters environments, or individual lint environments in tox.ini and runs the correct command. - Multi-linter execution: Runs ansible-lint, black, isort, flake8, pylint, flynt, and ruff through tox with clear pass/fail reporting. - Auto-fix guidance: Distinguishes auto-fixable failures (black, isort, flynt) from issues requiring manual fixes (pylint, flake8, ansible-lint). - Use Case: Before committing changes to an Ansible collection, run this Skill to validate code style and catch lint violations locally so CI pipelines pass on the first attempt. ## Quick Start Run the tox linters on my Ansible collection in the current directory and tell me which checks failed.

Frequently Asked Questions about tox-lint

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run all tox linters on an Ansible collection?▼

Run tox with the lint label using 'tox -m lint' if labels are configured, or 'tox -e linters' for a linters environment. The run-linters.py script detects the correct command automatically by inspecting tox.ini.

Which Python linters can tox run for code quality checks?▼

Common tox lint environments include black for formatting, isort for import sorting, flake8 for PEP 8 style, pylint for code analysis, flynt for f-string usage, and ruff for fast linting. Ansible collections typically also run ansible-lint.

Why does ansible-lint pass locally but fail in CI?▼

Many collections only configure Python linters in tox, so ansible-lint never runs locally. Run ansible-lint separately if it is not listed in your tox environments to match CI behavior.

How do I auto-fix black and isort lint failures?▼

Run 'tox -e black,isort,flynt' to apply automatic fixes for formatting, import sorting, and f-string conversions. Pylint, flake8, and ansible-lint failures require manual code changes.

What do I do when tox reports no lint environments configured?▼

Add a lint label to the [tox] section of tox.ini, for example 'labels = lint = black-lint, flake8-lint, pylint-lint'. Alternatively create a [testenv:linters] section that runs your lint commands.