Skip to content

Add IsGenerated function to the API  #213

Closed
@bzz

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions