-
Notifications
You must be signed in to change notification settings - Fork 0
Ignoring Files & Extensions
In some scenarios, you may want to exclude certain files or file extensions from being considered by coco when generating commit messages. This can be particularly useful for files that frequently change but don't significantly contribute to the context or content of a commit, such as package lock files or generated files.
You can specify individual files to be ignored by coco in the ignoredFiles array. These should be the paths of the files you want to exclude.
{
"ignoredFiles": [
"package-lock.json",
"your-specific-file.txt"
]
}This setting will ensure that changes in package-lock.json and your-specific-file.txt are not considered when generating commit messages.
Similarly, coco allows you to ignore files based on their extensions. This is done using the ignoredExtensions array, where you can list the extensions to be excluded.
{
"ignoredExtensions": [
".map",
".lock",
".your-extension"
]
}With this configuration, any file with extensions .map, .lock, or .your-extension will be ignored when coco analyzes changes for commit message generation.
coco comes with some default values for both ignoredFiles and ignoredExtensions:
-
Default for
ignoredFiles:["package-lock.json"] -
Default for
ignoredExtensions:[".map", ".lock"]
These defaults are designed to cover common scenarios, but you can customize them as per your project's requirements.