v3.2.0
v3.2.0
Summary
Some files and directories shouldn't count towards the line count shown in the git loc
command - that's what this update addresses!
Details
As a repository collaborator/owner you can now create a JSON file named .gitbot.json
at the root of your repo, which will allow you to ignore files and directories which you don't want to be included using fnmatch patterns:
{
"loc": {
"ignore": "*.ignored.extension"
}
}
or
{
"loc": {
"ignore": ["*.ignored.extension", "lib/*", "*.py[!cod]"]
}
}
More on fnmatch
fnmatch
is a Python module that powers this GitBot feature. It's similar to the .gitignore
syntax which you know and love.
In fnmatch
the following wildcards can be used:
Pattern | Meaning |
---|---|
* | matches everything |
? | matches any single character |
[seq] | matches any character in seq |
[!seq] | matches any character not in seq |
Notes
The introduction of the .gitbot.json
config spec opens the door for many fantastic features to be implemented in the future.