Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IsGenerated function to the API #213

Closed
bzz opened this issue Apr 3, 2019 · 1 comment
Closed

Add IsGenerated function to the API #213

bzz opened this issue Apr 3, 2019 · 1 comment

Comments

@bzz
Copy link
Contributor

bzz commented Apr 3, 2019

Linguist is capable of detecting if a file is generated one using a set of filename/content.

We should include this in Enry and make use of it in CLI for filtering.

This may include the work of parsing .rb file to extract the heuristics and updating the code generator.

It may be worth to explore an opportunity of a patch submission to upstream, reworking this detection logic from a custom Ruby code in generated.rb to a generated.yml templated, similar to what @smola did with heuristics.yml before (see #189 ).

But to be honest, after initial glance at all the Ruby code for those heuristics - it may be easier to just transliterate them to Go once as it has ~ 40 methods, with overall ~12 small, well-localized changes for that file per-year.

@bzz bzz added the enhancement label Apr 3, 2019
@bzz
Copy link
Contributor Author

bzz commented Jun 17, 2020

Implemented in go-enry/go-enry#22

@bzz bzz closed this as completed Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant