#git-tool #language-statistics

gengo

Get the language distribution stats of your repository

28 releases (9 breaking)

0.10.1 Jan 26, 2024
0.9.1 Dec 11, 2023
0.8.2 Nov 8, 2023

#113 in Template engine

Download history 76/week @ 2023-10-29 46/week @ 2023-11-05 31/week @ 2023-11-12 43/week @ 2023-11-19 152/week @ 2023-11-26 65/week @ 2023-12-03 135/week @ 2023-12-10 8/week @ 2023-12-17 58/week @ 2023-12-24 69/week @ 2023-12-31 5/week @ 2024-01-07 6/week @ 2024-01-14 42/week @ 2024-01-21 91/week @ 2024-01-28 33/week @ 2024-02-04 95/week @ 2024-02-11

261 downloads per month
Used in gengo-bin

MIT/Apache

56KB
1.5K SLoC

Gengo

Installing the binary

cargo install gengo-bin

Usage

API documentation

This tool has multiple file sources. Each file source can have unique usage to take advantage of its strengths and work around its weaknesses.

Directory File Source

This is a very generic file source that tries not to make many assumptions about your environment and workspace.

Ignoring Files

You can utilize a .gitignore file and/or an .ignore file to prevent files from being scanned. See the ignore for more details.

Git File Source

The git file source is highly opinionated -- it tries to act like a git utility, and uses git tools. Its goal is to behave similarly to linguist.

Overrides

Like linguist, you can override behavior using a .gitattributes file. Basically, just replace linguist-FOO with gengo-FOO. Unlike linguist, gengo-detectable will always make a file be included in statistics (linguist will still exclude them if they're generated or vendored).

# .gitattributes

# boolean attributes:

# These can be *negated* by prefixing with `-` (`-gengo-documentation`).
# Mark a file as documentation
*.html gengo-documentation
# Mark a file as generated
my-built-files/* gengo-generated
# Mark a file as vendored
deps/* gengo-vendored

# string attributes:
# Override the detected language for a file
# Spaces must be replaced with hyphens. Case-insensitive.
templates/*.js gengo-language=Plain-Text

You will need to commit your .gitattributes file for it to take effect.

Dependencies

~20–34MB
~611K SLoC