A fast and simple linter for .env files that enforces consistency and best practices.
dotenv-linter is a command-line tool that lints `.env` files to enforce consistency, best practices, and prevent common errors in environment variable configuration. It checks for issues like duplicate keys, incorrect naming conventions, unnecessary quotes, and spacing problems, helping developers maintain clean and reliable configuration files.
Developers and DevOps engineers who work with `.env` files for application configuration, particularly those using Python-based projects or pre-commit hooks for code quality.
It offers a fast, specialized solution for `.env` file linting with a wide range of built-in rules, seamless integration into development workflows, and a focus on preventing configuration errors that can lead to runtime issues.
:relaxed: Linting dotenv files like a charm!
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Checks for multiple common issues like duplicate keys, naming conventions, spacing, and quotes, covering a wide range of `.env` file pitfalls as listed in the documentation.
Easily integrates as a pre-commit hook, allowing automated linting in development workflows, which is highlighted in the README with configuration examples.
Enforces best practices such as UPPER_CASE naming and proper spacing to maintain clean, error-free configuration files, reducing security and runtime risks.
As a CLI tool, it's designed for quick execution, making it suitable for CI/CD pipelines and rapid feedback loops in development.
Only supports `.env` files, so teams using multiple configuration formats need additional tools, which can increase setup complexity.
Requires Python installation via pip, which might be inconvenient for non-Python projects or environments without Python readily available.
The README doesn't mention automatic fixing of violations; users must manually correct issues, which can slow down the workflow compared to linters with auto-fix.