Skip to content

Commit f037822

Browse files
committed
Release v4.0.0
Signed-off-by: Mikhail Grachev <[email protected]>
1 parent df51e04 commit f037822

File tree

8 files changed

+44
-61
lines changed

8 files changed

+44
-61
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.idea

docs/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
---
66

7-
Dotenv-linter can [check](/usage/check) / [fix](/usage/fix) / [compare](/usage/compare) `.env` files for problems that may cause the application to malfunction.
7+
Dotenv-linter can [check](/usage/check) / [fix](/usage/fix) / [diff](/usage/diff) `.env` files for problems that may cause the application to malfunction.
88

99
**Available checks**:
1010
<p>
@@ -16,6 +16,7 @@ Dotenv-linter can [check](/usage/check) / [fix](/usage/fix) / [compare](/usage/c
1616
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/leading_character">Leading character</a><br />
1717
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/lowercase_key">Lowercase key</a><br />
1818
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/quote_character">Quote character</a><br />
19+
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/schema_violation">Schema violation</a><br />
1920
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/space_character">Space character</a><br />
2021
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/substitution_key">Substitution key</a><br />
2122
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="#/checks/trailing_whitespace">Trailing whitespace</a><br />

docs/_sidebar.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
* [👨‍💻 Installation](installation.md)
33

44
* 🎉 What's new?
5-
* [v3.3.1 (latest)](whats_new/v331.md)
5+
* [v4.0.0 (latest)](whats_new/v400.md)
6+
* [v3.3.1](whats_new/v331.md)
67
* [v3.3.0](whats_new/v330.md)
78
* [v3.2.0](whats_new/v320.md)
89
* [v3.1.1](whats_new/v311.md)
@@ -13,9 +14,8 @@
1314

1415
* 🚀 Usage
1516
* [✅ Check](usage/check.md)
16-
* [🤲 Compare](usage/compare.md)
17+
* [🤲 Diff](usage/diff.md)
1718
* [🛠 Fix](usage/fix.md)
18-
* [📄 List](usage/list.md)
1919

2020
* ✅ Checks
2121
* [Duplicated key](checks/duplicated_key.md)
@@ -26,6 +26,7 @@
2626
* [Leading character](checks/leading_character.md)
2727
* [Lowercase key](checks/lowercase_key.md)
2828
* [Quote character](checks/quote_character.md)
29+
* [Schema violation](checks/schema_violation.md)
2930
* [Space character](checks/space_character.md)
3031
* [Substitution key](checks/substitution_key.md)
3132
* [Trailing whitespace](checks/trailing_whitespace.md)

docs/usage/check.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# ✅ Check
22

3-
By default, `dotenv-linter` checks all `.env` files in the current directory:
3+
`dotenv-linter` can check all `.env` files in a directory:
44

55
```bash
6-
$ dotenv-linter
6+
$ dotenv-linter check .
77
Checking .env
88
.env:2 DuplicatedKey: The FOO key is duplicated
99
.env:3 UnorderedKey: The BAR key should go before the FOO key
@@ -17,7 +17,7 @@ Found 3 problems
1717
To check another directory, just pass its path as an argument. The same approach works if you need to check any files individually:
1818

1919
```bash
20-
$ dotenv-linter dir1 dir2/.my-env-file
20+
$ dotenv-linter check dir1 dir2/.my-env-file
2121
Checking dir1/.env
2222
dir1/.env:1 LeadingCharacter: Invalid leading character detected
2323
dir1/.env:3 IncorrectDelimiter: The FOO-BAR key has incorrect delimiter
@@ -33,7 +33,7 @@ Found 3 problems
3333
If you need to exclude a file from check, you can use the `--exclude FILE_PATH` argument (or its short version `-e`):
3434

3535
```bash
36-
$ dotenv-linter --exclude .env.test
36+
$ dotenv-linter check --exclude .env.test .
3737
Checking .env
3838
.env:2 DuplicatedKey: The FOO key is duplicated
3939
.env:3 UnorderedKey: The BAR key should go before the FOO key
@@ -46,7 +46,7 @@ Found 2 problems
4646
If you need a recursive search inside directories (deeper than 1 level), you can use the `--recursive` argument (or its short version `-r`):
4747

4848
```bash
49-
$ dotenv-linter --recursive
49+
$ dotenv-linter check --recursive .
5050
Checking .env
5151
Checking dir1/.env
5252
dir1/.env:2 DuplicatedKey: The FOO key is duplicated
@@ -57,12 +57,12 @@ dir2/subdir/.env:3 IncorrectDelimiter: The FOO-BAR key has incorrect delimiter
5757
Found 2 problems
5858
```
5959

60-
#### Skip checks
60+
#### Ignore checks
6161

62-
If you need to skip some checks, you can use the `--skip CHECK_NAME` argument (or its short version `-s`):
62+
If you need to ignore some checks, you can use the `--ignore-checks CHECK_NAME` argument (or its short version `-i`):
6363

6464
```bash
65-
$ dotenv-linter --skip UnorderedKey EndingBlankLine
65+
$ dotenv-linter check --ignore-checks UnorderedKey,EndingBlankLine .
6666
Checking .env
6767
.env:2 DuplicatedKey: The FOO key is duplicated
6868

@@ -87,18 +87,18 @@ BAR=FOO
8787
If you want to see only warnings without additional information, use the `--quiet` argument (or its short version `-q`):
8888

8989
```bash
90-
$ dotenv-linter --quiet
90+
$ dotenv-linter check --quiet .
9191
.env:2 DuplicatedKey: The FOO key is duplicated
9292
.env:3 UnorderedKey: The BAR key should go before the FOO key
9393
.env.test:1 LeadingCharacter: Invalid leading character detected
9494
```
9595

9696
#### Disable colored output
9797

98-
By default, the output is colored. If you want to disable colored output, you can use the `--no-color` argument:
98+
By default, the output is colored. If you want to disable colored output, you can use the `--plain` argument:
9999

100100
```bash
101-
$ dotenv-linter --no-color
101+
$ dotenv-linter check --plain .
102102
.env:2 DuplicatedKey: The FOO key is duplicated
103103
.env:3 UnorderedKey: The BAR key should go before the FOO key
104104
.env.test:1 LeadingCharacter: Invalid leading character detected
@@ -112,7 +112,7 @@ By default, `dotenv-linter` checks for a new version once a day.
112112
If the new version is available, it will display information about it:
113113

114114
```bash
115-
$ dotenv-linter
115+
$ dotenv-linter check .
116116
.env:2 DuplicatedKey: The FOO key is duplicated
117117
.env:3 UnorderedKey: The BAR key should go before the FOO key
118118
.env.test:1 LeadingCharacter: Invalid leading character detected
@@ -123,7 +123,7 @@ A new release of dotenv-linter is available: v3.1.0 -> v3.1.1
123123
https://github.com/dotenv-linter/dotenv-linter/releases/tag/v3.1.1
124124
```
125125

126-
If you want to disable checking for updates, you can use the `--not-check-updates` argument.
126+
If you want to disable checking for updates, you can use the `--skip-updates` argument.
127127

128128
#### Export prefix
129129

docs/usage/compare.md

Lines changed: 0 additions & 17 deletions
This file was deleted.

docs/usage/diff.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# 🤲 Diff
2+
3+
`dotenv-linter` can compare `.env` files with each other and output the difference between them with the `diff` command:
4+
5+
```bash
6+
$ dotenv-linter diff .env .env.example
7+
Comparing .env
8+
Comparing .env.example
9+
.env is missing keys: BAR
10+
.env.example is missing keys: FOO
11+
```
12+
13+
#### Additional arguments
14+
15+
In addition, the `diff` command supports the following list of arguments:
16+
* [--quiet](/usage/check?id=quiet-mode)
17+
* [--plain](/usage/check?id=disable-colored-output)

docs/usage/fix.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# 🛠 Fix
22

3-
`dotenv-linter` can also fix the found warnings with the `fix` command (or its short version `f`):
3+
`dotenv-linter` can also fix the found warnings with the `fix` command:
44

55
```bash
6-
$ dotenv-linter fix
6+
$ dotenv-linter fix .
77
Fixing .env
88
Original file was backed up to: ".env_1601378896"
99

@@ -18,7 +18,7 @@ All warnings are fixed. Total: 2
1818
By default, `fix` creates backups of files. If you want to disable the backup function, use the argument `--no-backup`:
1919

2020
```bash
21-
$ dotenv-linter fix --no-backup
21+
$ dotenv-linter fix --no-backup .
2222
Fixing .env
2323
.env:2 DuplicatedKey: The BAR key is duplicated
2424
.env:3 LowercaseKey: The foo key should be in uppercase
@@ -31,26 +31,25 @@ All warnings are fixed. Total: 2
3131
If you want to run `fix` without modifying any files on disk, use the `--dry-run` flag.
3232

3333
```bash
34-
$ dotenv-linter fix --dry-run
34+
$ dotenv-linter fix --dry-run .
3535
Fixing .env
3636
Dry run - not changing any files on disk.
3737

3838
BAR=bar_example_one
3939
# BAR=bar_example_two
4040
FOO=foo_example
4141

42-
4342
.env:2 DuplicatedKey: The BAR key is duplicated
4443
.env:3 LowercaseKey: The foo key should be in uppercase
4544

4645
All warnings are fixed. Total: 2
4746
```
4847

49-
#### Addition arguments
48+
#### Additional arguments
5049

5150
In addition, the `fix` command supports the following list of arguments:
5251
* [--exclude](/usage/check?id=exclude-files)
5352
* [--recursive](/usage/check?id=recursive-check)
54-
* [--skip](/usage/check?id=skip-checks)
53+
* [--ignore-checks](/usage/check?id=ignore-checks)
5554
* [--quiet](/usage/check?id=quiet-mode)
56-
* [--no-color](/usage/check?id=disable-colored-output)
55+
* [--plain](/usage/check?id=disable-colored-output)

docs/usage/list.md

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)