Excluding Paths
Sometimes it is necessary to skip paths from being checked.
For example, you might want to skip the node_modules
directory or a vendor
directory.
You might think that you can just put the path in the .lycheeignore
file, but that won’t work.
The .lycheeignore
file is only used for excluding URLs, not paths.
Instead, you can use the --exclude-path
flag to exclude paths from being checked.
Example: --exclude-path node_modules
or --exclude-path example\.(com|org)
.
Alternatively, you can also use the exclude_path
key in the configuration file:
Regular expressions are also supported.
Here is an example config file.
Examples
Here are some more helpful use-cases for excluding paths to get you started.
Dependency Management
Exclude third-party dependencies as they’re not typically user-maintained.
Build and Distribution Directories
Skip generated or compiled directories.
Temporary Files and Directories
Avoid checking transient or temporary storage.
Version Control
Exclude version control directories.
Documentation and Non-Code Assets
Skip documentation and non-code related directories.
Backup Files
Avoid checking backup files created by editors or tools.
Logs and Databases
Exclude directories or files storing logs or databases.