dotenv-linter


Namedotenv-linter JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://dotenv-linter.readthedocs.io
SummaryLinting dotenv files like a charm!
upload_time2024-03-13 11:52:10
maintainer
docs_urlNone
authorsobolevn
requires_python>=3.9,<4.0
licenseMIT
keywords dotenv linter wemake.services code quality
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

            

Raw data

            {
    "_id": null,
    "home_page": "https://dotenv-linter.readthedocs.io",
    "name": "dotenv-linter",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "dotenv,linter,wemake.services,code quality",
    "author": "sobolevn",
    "author_email": "mail@sobolevn.me",
    "download_url": "https://files.pythonhosted.org/packages/ef/fe/77e184ccc312f6263cbcc48a9579eec99f5c7ff72a9b1bd7812cafc22bbb/dotenv_linter-0.5.0.tar.gz",
    "platform": null,
    "description": "# dotenv-linter\n\n[![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)\n[![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)\n[![codecov](https://codecov.io/gh/wemake-services/dotenv-linter/branch/master/graph/badge.svg)](https://codecov.io/gh/wemake-services/dotenv-linter)\n[![Github Action](https://github.com/wemake-services/dotenv-linter/workflows/dotenv/badge.svg)](https://github.com/wemake-services/dotenv-linter/actions?query=workflow%3Adotenv)\n[![Python Version](https://img.shields.io/pypi/pyversions/dotenv-linter.svg)](https://pypi.org/project/dotenv-linter/)\n[![Documentation Status](https://readthedocs.org/projects/dotenv-linter/badge/?version=latest)](https://dotenv-linter.readthedocs.io/en/latest/?badge=latest)\n\n---\n\nSimple linter for `.env` files.\n\n![dotenv-logo](https://raw.githubusercontent.com/wemake-services/dotenv-linter/master/docs/_static/dotenv-logo@2.png)\n\nWhile `.env` files are very simple it is required to keep them consistent.\nThis tool offers a wide range of consistency rules and best practices.\n\nAnd it integrates perfectly to any existing workflow.\n\nRead [the announcing post](https://sobolevn.me/2019/01/announcing-dotenv-linter).\n\n\n## Installation and usage\n\n```bash\npip install dotenv-linter\n```\n\nAnd then run it:\n\n```bash\ndotenv-linter .env .env.template\n```\n\nSee [Usage](https://dotenv-linter.readthedocs.io/en/latest/#usage)\nsection for more information.\n\n\n## Examples\n\nThere are many things that can go wrong in your `.env` files:\n\n```ini\n# Next line has leading space which will be removed:\n SPACED=\n\n# Equal signs should not be spaced:\nKEY = VALUE\n\n# Quotes won't be preserved after parsing, do not use them:\nSECRET=\"my value\"\n\n# Beware of duplicate keys!\nSECRET=Already defined ;(\n\n# Respect the convention, use `UPPER_CASE`:\nkebab-case-name=1\nsnake_case_name=2\n```\n\nAnd much more! You can find the [full list of violations in our docs](https://dotenv-linter.readthedocs.io/en/latest/pages/violations/).\n\n\n## Pre-commit hooks\n\n`dotenv-linter` can also be used as a [pre-commit](https://github.com/pre-commit/pre-commit) hook.\nTo do so, add the following to the `.pre-commit-config.yaml` file at the root of your project:\n\n```yaml\nrepos:\n  - repo: https://github.com/wemake-services/dotenv-linter\n    rev: 0.2.0  # Use the ref you want to point at\n    hooks:\n      - id: dotenv-linter\n```\n\nFor the more detailed instructions on the pre-commit tool itself,\nplease refer to [its website](https://pre-commit.com/).\n\n## Gratis\n\nSpecial thanks goes to [Ignacio Toledo](https://ign.uy)\nfor creating an awesome logo for the project.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Linting dotenv files like a charm!",
    "version": "0.5.0",
    "project_urls": {
        "Homepage": "https://dotenv-linter.readthedocs.io",
        "Repository": "https://github.com/wemake-services/dotenv-linter"
    },
    "split_keywords": [
        "dotenv",
        "linter",
        "wemake.services",
        "code quality"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f00162ed4374340e6cf17c5084828974d96db8085e4018439ac41dc3cbbbcab3",
                "md5": "3788785bb9dd05f12a5522ce3e06b5fe",
                "sha256": "fd01cca7f2140cb1710f49cbc1bf0e62397a75a6f0522d26a8b9b2331143c8bd"
            },
            "downloads": -1,
            "filename": "dotenv_linter-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3788785bb9dd05f12a5522ce3e06b5fe",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 21770,
            "upload_time": "2024-03-13T11:52:08",
            "upload_time_iso_8601": "2024-03-13T11:52:08.607758Z",
            "url": "https://files.pythonhosted.org/packages/f0/01/62ed4374340e6cf17c5084828974d96db8085e4018439ac41dc3cbbbcab3/dotenv_linter-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "effe77e184ccc312f6263cbcc48a9579eec99f5c7ff72a9b1bd7812cafc22bbb",
                "md5": "79dcb18d58d22902363603db69513095",
                "sha256": "4862a8393e5ecdfb32982f1b32dbc006fff969a7b3c8608ba7db536108beeaea"
            },
            "downloads": -1,
            "filename": "dotenv_linter-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "79dcb18d58d22902363603db69513095",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 15346,
            "upload_time": "2024-03-13T11:52:10",
            "upload_time_iso_8601": "2024-03-13T11:52:10.520883Z",
            "url": "https://files.pythonhosted.org/packages/ef/fe/77e184ccc312f6263cbcc48a9579eec99f5c7ff72a9b1bd7812cafc22bbb/dotenv_linter-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-13 11:52:10",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "wemake-services",
    "github_project": "dotenv-linter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dotenv-linter"
}
        
Elapsed time: 0.20088s