make the lines of code statistics more precise and informative.

Awesome Graphs shows lines of code statistics in the Contributors graph and the Code Frequency graph. It is possible to exclude files from statistics on the repository level.

You can exclude:

The exclusion of files allows you to make lines of code statistics more precise and informative. This feature will be helpful for users, who:

Below on the page, you'll find:

For easier navigation, use the Table of Contents at the top-right of the page.

How to use the feature

Customization of lines of code statistics is available in the repository settings. Repository administrators can modify these settings.

To exclude files from lines of code statistics of a repository:

Here you may add patterns in .gitignore format telling what files and directories should be excluded from lines of code statistics of the repository. 

Pattern examples

Here are a few examples of the exclusion of files.

Exclude all files with the selected extensions

*.txt
*.json

These patterns will exclude all files with extensions .txt and .json.

Exclude all files from the selected directories

libraries/
logs/
third_party/

These patterns will exclude all files from directories libraries, logs and third_party.

Exclude everything except files from the selected directory

*
!/src/

These patterns will exclude all files except files from the directory src in the repository root. By using this approach you will get lines of code statistics only for the selected directory or list of directories.

Exclude everything except files with the selected extensions

*
!*.js

These patterns will exclude all files except files with .js extensions. By using this approach you will get lines of code statistics only for the selected types of files.

Combination of patterns

*
!*.c
!*.cpp
!*.h
library/
!library/ownlib/**/*.c
!library/ownlib/**/*.cpp
!library/ownlib/**/*.h

All files will be excluded from statistics. Files with c, cpp, h extensions will be included into statistics. All files from the directory library will be excluded from statistics (even files with c, cpp, h extensions). Files with with  c, cpp, h extensions from the subdirectory library/ownlib will be included into statistics.

More examples

You can see more examples of .gitignore patterns here.

Need help?

We can prepare patterns for you. If you need help, raise a support ticket and describe your use case.