--- id: salt-lint version: "0.9.2" license: MIT license_treatment: permissive maintenance: active --- # salt-lint — A command-line utility that checks for best practices in SaltStack. License: permissive · Maintenance: active · Downloads: 504.7K/mo ## What it is and what it does salt-lint is a command-line linter for SaltStack state files (SLS format), designed to catch style violations, structural issues, and anti-patterns that could lead to runtime problems or maintenance headaches. It runs a set of numbered rules—covering indentation, quoting, Jinja templating, deprecated state options, and naming conventions—and reports violations with file location and severity. The tool depends on pyyaml for parsing YAML and pathspec for file filtering, making it a lightweight addition to a Salt development workflow. You run it as a CLI tool against a directory or individual SLS files, and it outputs violations in a format suitable for CI/CD pipelines or editor integration. The project is modeled on ansible-lint and has been actively maintained since 2019, with support for modern Python versions (3.6–3.11) and regular rule additions to catch new categories of mistakes. Use it for: - Enforce consistent formatting and style across a team's SaltStack state files before deployment. - Catch deprecated Salt state options and syntax errors early in development or CI/CD pipelines. - Validate SLS file naming and structure to prevent runtime reference failures in Salt. - Integrate into pre-commit hooks or CI workflows to block commits with linting violations. - Identify common Jinja templating mistakes and missing spaces in variable interpolation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. salt-lint checks Salt State files (SLS) for best practices and potential improvements, flagging style and behavior issues via command-line rules. Yes. salt-lint is a stable, actively maintained tool with low install friction, no known vulnerabilities, and a permissive MIT license. It fills a clear need for SaltStack users who want automated quality checks on state files. Install it if you manage Salt configurations and want to catch style and logic issues before they reach production. ## Install pip install salt-lint uv add salt-lint poetry add salt-lint ## Installing salt-lint Before you install: Low install friction with only two runtime dependencies (pyyaml, pathspec). Actively maintained as of 2026-05-06 with stable production status. License in practice: MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install salt-lint salt-lint /path/to/sls/files/ # Or check a single file: salt-lint mystate.sls Requires Python 3.6 or later; pyyaml and pathspec must be installed (handled automatically by pip). Verify before relying: - Whether the rule set (e.g., rules 901–915 for deprecated states) remains current with recent Salt versions. - Performance characteristics when linting large SLS file collections or deeply nested state definitions. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 504.7K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags salt state file linter, saltstack sls checker, salt best practices validator, sls file quality check, saltstack code linting, salt configuration lint, sls syntax and style checker, saltstack, linting, configuration-management [View on SkillFed](https://skillfed.io/packages/salt-lint) · [View on PyPI](https://pypi.org/project/salt-lint/)