Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check

GitHub Action

dotenv-linter

0.1.5

dotenv-linter

check

dotenv-linter

Runs dotenv-linter as a Github Action

Installation

Copy and paste the following snippet into your .yml file.

              

- name: dotenv-linter

uses: wemake-services/dotenv-linter@0.1.5

Learn more about this action in wemake-services/dotenv-linter

Choose a version

dotenv-linter

wemake.services Build Status Coverage Github Action Python Version Documentation 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 and usage

pip install dotenv-linter

And then run it:

dotenv-linter .env .env.template

See Usage section for more information.

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 duplicate keys!
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.