Ignoring Lines and Sections
dotenv-diff can skip certain lines or code sections from being flagged during scanning. This is helpful when you know a specific warning is safe in your source code.
Ignore a Single Line
This will suppress potential secret warnings for the hardcoded URL but still allow dotenv-diff to report other issues (like missing variables) elsewhere.
HTML
Or tsx/jsx Files
Ignore Entire Sections
OrAll lines between <!-- dotenv-diff-ignore-start --> and <!-- dotenv-diff-ignore-end --> are ignored.
Alternative Configuration
If you need to ignore entire files, folders, or key patterns globally, consider using configuration options instead:
- --exclude-files - File patterns to exclude from scanning.
- --ignore - List of keys to ignore during comparison or scanning.
- --ignore-regex - Regex patterns to skip matching keys.
For full list of supported options and examples, see the configuration and flags documentation on GitHub.