Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/cargo/serde-1.0.183
Browse files Browse the repository at this point in the history
  • Loading branch information
spenserblack authored Aug 9, 2023
2 parents 8ffebcf + 50e676f commit 36ff218
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,31 @@ A bit like [tokei][tokei], a lot like [linguist][linguist].
| **Detect Language with Heuristics** | Yes | No | Yes |
| **Detect Language with Classifier** | Yes | No | Not Yet ;) |

## Usage

### Overrides

Like [linguist][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
```

[linguist]: https://github.com/github-linguist/linguist
[tokei]: https://github.com/xampprocky/tokei

0 comments on commit 36ff218

Please sign in to comment.