• Stars
    star
    270
  • Rank 147,040 (Top 3 %)
  • Language
    Python
  • License
    MIT License
  • Created over 5 years ago
  • Updated 21 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

โ˜บ๏ธ Linting dotenv files like a charm!

dotenv-linter

wemake.services Build Status codecov 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.

Read the announcing post.

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.

Pre-commit hooks

dotenv-linter can also be used as a pre-commit hook. To do so, add the following to the .pre-commit-config.yaml file at the root of your project:

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.

Gratis

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

More Repositories

1

wemake-python-styleguide

The strictest and most opinionated python linter ever!
Python
2,417
star
2

wemake-django-template

Bleeding edge django template focused on code quality and security.
Python
1,933
star
3

django-split-settings

Organize Django settings into multiple files and directories. Easily override and modify settings. Use wildcards and optional settings files.
Python
1,031
star
4

wemake-vue-template

Bleeding edge vue template focused on code quality and developer happiness.
TypeScript
730
star
5

django-test-migrations

Test django schema and data migrations, including migrations' order and best practices.
Python
490
star
6

wemake-python-package

Bleeding edge cookiecutter template to create new python packages
Python
395
star
7

flake8-eradicate

Flake8 plugin to find commented out or dead code
Python
304
star
8

caddy-gen

Automated Caddy reverse proxy for docker containers
Shell
229
star
9

recase

โ™ป๏ธ Convert strings to any case.
Elixir
215
star
10

nuxt-imagemin

Nuxt module to minify your images. Works with: png, jpeg, gif, and svg
JavaScript
178
star
11

ecto_autoslug_field

Automatically create slugs for Ecto schemas.
Elixir
147
star
12

jekyll-theme-hackcss

Dead simple CSS framework now with Jekyll.
HTML
123
star
13

docker-image-size-limit

๐Ÿณ Keep an eye on your docker image size and prevent it from growing too big
Python
113
star
14

flake8-broken-line

๐Ÿšจ Flake8 plugin to forbid backslashes (\) for line breaks
Python
108
star
15

kira-dependencies

๐Ÿฟ Kira's micro-bot to update project dependencies
Ruby
102
star
16

dump-env

A utility tool to create .env files
Python
97
star
17

wemake-frontend-styleguide

Set of the strictest linters for your next frontend app
JavaScript
74
star
18

kira

๐Ÿฟ๏ธ Project management framework with deep philosophy underneath
Elixir
69
star
19

coverage-conditional-plugin

Conditional coverage based on any rules you define!
Python
63
star
20

meta

Home of Repeatable Software Development Process
HTML
51
star
21

pravda

Python type-checker written in Rust
Makefile
33
star
22

nuxt-babel

Use normal .babelrc file with your Nuxt app
JavaScript
33
star
23

asyncio-redis-rate-limit

Rate limiter for async functions using Redis as a backend.
Python
30
star
24

vue-material-input

Simple implementation of Material Input with no dependencies
Vue
24
star
25

vue-analytics-facebook-pixel

A small wrapper around Facebook Pixel API
JavaScript
23
star
26

mypy-extras

A collection of extra types and features for mypy
Python
22
star
27

caddy-docker

Docker image for Caddy
Dockerfile
19
star
28

awesome-microtasking

List of awesome resources and companies that practice microtasking
15
star
29

jinja2-git

Jinja2 extension to handle git-specific things
Python
15
star
30

safe-assert

Safe and composable assert for Python that can be used together with optimised mode
Python
13
star
31

kira-stale

๐Ÿฟ๏ธ Kira's micro-bot to fight with stale GitLab issues and merge requests
Procfile
13
star
32

pytest-modified-env

Pytest plugin to fail a test if it leaves modified `os.environ` afterwards.
Python
11
star
33

vue-material-ripple

Simple material ripple effect wrapped in a component
Vue
11
star
34

remark-lint-are-links-valid

This package allows to perform multiple checks on your links
JavaScript
11
star
35

wemake-django-rest

Create Django REST APIs the right way, no magic intended
HTML
11
star
36

wemake-dind

Our docker-in-docker image with Python
Dockerfile
10
star
37

stylelint-config-strict-scss

Deprecated, use wemake-frontend-styleguide instead
JavaScript
8
star
38

kira-review

๐Ÿฟ๏ธ Kira's micro-bot to review merge requests before real humans
Ruby
7
star
39

django-pre-deploy-checks

Django checks that you should run on application deploy
Python
5
star
40

mimesis-cloud

Python
5
star
41

kira-release

๐Ÿฟ๏ธ Kira's micro-bot to release your code and track changes
JavaScript
5
star
42

vue-material-radio

Simple implementation of Material Radio Button with no dependencies
Vue
4
star
43

eslint-config-flowtype-essential

Deprecated, use wemake-frontend-styleguide instead
JavaScript
4
star
44

kira-setup

๐Ÿฟ Kira's micro-bot to setup new projects
Python
3
star
45

remark-lint-list-item-punctuation

This package allows to check either a list item ends with a period.
JavaScript
3
star
46

eslint-config-jsdoc-essential

Deprecated, use wemake-frontend-styleguide instead
JavaScript
2
star
47

.github

GitHub metadata
1
star
48

wemake-services.github.io

Company's website. As minimal as possible.
JavaScript
1
star