refactor: finish moving ssh-* scripts to own installers
[webi-installers/.git] / dotenv-linter / README.md
1 ---
2 title: Dotenv Linter
3 homepage: https://dotenv-linter.github.io/
4 tagline: |
5   dotenv-linter: ⚡️ Lightning-fast linter for .env files. Written in Rust 🦀
6 ---
7
8 ### Updating `dotenv-linter`
9
10 `webi dotenv-linter@stable`
11
12 Use the `@beta` tag for pre-releases.
13
14 #### Windows 10
15
16 On Windows 10 you'll get an error like this:
17
18 > execution cannot proceed run because `vcruntime140.dll` was not found
19
20 You need to download and install the
21 [Microsoft Visual C++ Redistributable](https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads).
22
23 ## Cheat Sheet
24
25 > Dotenv Linter is a lightning-fast check for your `.env` files. It can rapidly
26 > detect and automatically fix issues.
27
28 By default, `dotenv-linter` checks all `.env` files in the current directory:
29
30 ```bash
31 dotenv-linter
32 ```
33
34 This is the same as the default behavior:
35
36 ```bash
37 dotenv-linter .env .env.*
38 ```
39
40 To lint .env files recursively, use `-r`:
41
42 ```bash
43 dotenv-linter -r
44 ```
45
46 For the complete usage, see the official
47 [Dotenv Linter Usage Guide](https://dotenv-linter.github.io/#/usage).
48
49 ### How to automatically fix errors
50
51 Use the `--fix` flag.
52
53 ```bash
54 dotenv-linter --fix
55 ```
56
57 Backup files in the format of `.env_0000000000` will be created by default. You
58 can use `--no-backup` to skip this.
59
60 ### How to toggle linter rules
61
62 You can turn off certain linter checks with `--skip` options, for example:
63
64 ```bash
65 dotenv-linter --skip QuoteCharacter --skip UnorderedKey
66 ```
67
68 You can see the full list of linter rules with `dotenv-linter --show-checks`:
69
70 ```txt
71 DuplicatedKey
72 EndingBlankLine
73 ExtraBlankLine
74 IncorrectDelimiter
75 LeadingCharacter
76 KeyWithoutValue
77 LowercaseKey
78 QuoteCharacter
79 SpaceCharacter
80 TrailingWhitespace
81 UnorderedKey
82 ```