Skip to content

secrets/dotenv-linter

Checks every tracked environment file: key format, duplicates, quoting, ordering, and trailing spaces.

Part of the secrets configuration, at the recommended level. It runs at the commit stage, per file. It runs dotenv-linter. gspot check --fix fixes what it can.

Other people copy a tracked environment file, so a malformed line in it spreads to every machine.

Run gspot check --fix, or fix the line dotenv-linter names.

A dotenv file that defines one key twice reports a duplicate. Keep one line, and delete the other.

Turn it off for some files, or one of its lint rules, with a reason:

gspot ignore secrets/dotenv-linter --paths "<glob>" --reason "<why>"
gspot ignore secrets/dotenv-linter --rule <rule> --reason "<why>"