dotenv-linter

wemake.services Build Status Coverage Python Version Documentation Status Dependencies Status

Simple linter for .env files.

dotenv-logo

While .env files are very simple it is required to keep them consistent. This tool offers a wide range of consistency rules and best practices.

And it integrates perfectly to any existing workflow.

Installation

pip install dotenv-linter

See Usage section to get started.

Examples

There are many things that can go wrong in your .env files:

# Next line has leading space which will be removed:
 SPACED=

# Equal signs should not be spaced:
KEY = VALUE

# Quotes won't be preserved after parsing, do not use them:
SECRET="my value"

# Beware of duplicates!
SECRET=Already defined ;(

# Respect the convention, use `UPPER_CASE`:
kebab-case-name=1
snake_case_name=2

And much more! You can find the full list of violations in our docs.

Gratis

Special thanks goes to Ignacio Toledo for creating an awesome logo for the project.

Usage

dotenv-linter

Main entrypoint to the app.

Runs lint command by default if nothing else is not specified. Runs --version subcommand if this option is provided.

dotenv-linter [OPTIONS] COMMAND [ARGS]...

Options

--version

lint

Runs linting process for the given files.

dotenv-linter lint [OPTIONS] FILES...

Arguments

FILES

Required argument(s)

Indices and tables