Metadata-Version: 2.1
Name: dotenv-linter
Version: 0.5.0
Summary: Linting dotenv files like a charm!
Home-page: https://dotenv-linter.readthedocs.io
License: MIT
Keywords: dotenv,linter,wemake.services,code quality
Author: sobolevn
Author-email: mail@sobolevn.me
Requires-Python: >=3.9,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Quality Assurance
Requires-Dist: attrs
Requires-Dist: click (>=6,<9)
Requires-Dist: click_default_group (>=1.2,<2.0)
Requires-Dist: ply (>=3.11,<4.0)
Requires-Dist: typing_extensions (>=4.0,<5.0)
Project-URL: Repository, https://github.com/wemake-services/dotenv-linter
Description-Content-Type: text/markdown

# dotenv-linter

[![wemake.services](https://img.shields.io/badge/%20-wemake.services-green.svg?label=%20&logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAALGPC%2FxhBQAAAAFzUkdCAK7OHOkAAAAbUExURQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP%2F%2F%2F5TvxDIAAAAIdFJOUwAjRA8xXANAL%2Bv0SAAAADNJREFUGNNjYCAIOJjRBdBFWMkVQeGzcHAwksJnAPPZGOGAASzPzAEHEGVsLExQwE7YswCb7AFZSF3bbAAAAABJRU5ErkJggg%3D%3D)](https://wemake-services.github.io)
[![Build Status](https://github.com/wemake-services/dotenv-linter/workflows/test/badge.svg?branch=master&event=push)](https://github.com/wemake-services/dotenv-linter/actions?query=workflow%3Atest)
[![codecov](https://codecov.io/gh/wemake-services/dotenv-linter/branch/master/graph/badge.svg)](https://codecov.io/gh/wemake-services/dotenv-linter)
[![Github Action](https://github.com/wemake-services/dotenv-linter/workflows/dotenv/badge.svg)](https://github.com/wemake-services/dotenv-linter/actions?query=workflow%3Adotenv)
[![Python Version](https://img.shields.io/pypi/pyversions/dotenv-linter.svg)](https://pypi.org/project/dotenv-linter/)
[![Documentation Status](https://readthedocs.org/projects/dotenv-linter/badge/?version=latest)](https://dotenv-linter.readthedocs.io/en/latest/?badge=latest)

---

Simple linter for `.env` files.

![dotenv-logo](https://raw.githubusercontent.com/wemake-services/dotenv-linter/master/docs/_static/dotenv-logo@2.png)

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.

Read [the announcing post](https://sobolevn.me/2019/01/announcing-dotenv-linter).


## Installation and usage

```bash
pip install dotenv-linter
```

And then run it:

```bash
dotenv-linter .env .env.template
```

See [Usage](https://dotenv-linter.readthedocs.io/en/latest/#usage)
section for more information.


## Examples

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

```ini
# 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](https://dotenv-linter.readthedocs.io/en/latest/pages/violations/).


## Pre-commit hooks

`dotenv-linter` can also be used as a [pre-commit](https://github.com/pre-commit/pre-commit) hook.
To do so, add the following to the `.pre-commit-config.yaml` file at the root of your project:

```yaml
repos:
  - repo: https://github.com/wemake-services/dotenv-linter
    rev: 0.2.0  # Use the ref you want to point at
    hooks:
      - id: dotenv-linter
```

For the more detailed instructions on the pre-commit tool itself,
please refer to [its website](https://pre-commit.com/).

## Gratis

Special thanks goes to [Ignacio Toledo](https://ign.uy)
for creating an awesome logo for the project.

