Commit graph

8 commits

Author SHA1 Message Date
cassiozareck ab0eb1c47b
Rename code_langauge.go to code_language.go () 2023-08-07 15:00:53 -04:00
flynnnnnnnnnn e81ccc406b
Implement FSFE REUSE for golang files ()
Change all license headers to comply with REUSE specification.

Fix 

Co-authored-by: flynnnnnnnnnn <flynnnnnnnnnn@github>
Co-authored-by: John Olheiser <john.olheiser@gmail.com>
2022-11-27 18:20:29 +00:00
Gusted 3ece9d5794
Simplify IsVendor ()
The changes in this file were upstreamed directly into go-enry as https://github.com/go-enry/go-enry/pull/44
and therefore they are no longer needed.
2022-05-06 10:12:30 +01:00
zeripath 248b96d8a3
Use git attributes to determine generated and vendored status for language stats and diffs ()
Replaces 
Replaces 
Replaces 

This PR first implements a `git check-attr` pipe reader - using `git check-attr --stdin -z --cached` - taking account of the change in the output format in git 1.8.5 and creates a helper function to read a tree into a temporary index file for that pipe reader.

It then wires this in to the language stats helper and into the git diff generation.

Files which are marked generated will be folded by default.

Fixes 
Fixes 
2021-09-09 21:13:36 +01:00
zeripath ff460ca74d
Speed up enry.IsVendor ()
`enry.IsVendor` is kinda slow as it simply iterates across all regexps.
This PR ajdusts the regexps to combine them to make this process a
little quicker.

Related 

Signed-off-by: Andrew Thornton <art27@cantab.net>
2021-04-01 19:41:09 +02:00
Lauris BH bd2335671f
Exclude generated files from language statistics ()
* Update go-enry to v2.5.2
2020-05-29 09:20:01 +03:00
Lauris BH 4dc62dadce
Migrate to go-enry new version () 2020-04-15 20:40:39 +03:00
Lauris BH 3c45cf8494
Add detected file language to code search ()
Move langauge detection to separate module to be more reusable

Add option to disable vendored file exclusion from file search

Allways show all language stats for search
2020-02-20 16:53:55 -03:00