Is it possible to exclude files from git language statistics?

前端 未结 2 395
情话喂你
情话喂你 2021-01-01 11:57

Silly question and not on something that is so necessary, but is it possible to exclude files from git language statistics aggregation on top?

I have checked some ex

相关标签:
2条回答
  • 2021-01-01 12:28

    From the Github Help page My repository is marked as the wrong language:

    Linguist excludes certain file names and paths from statistics. Check out the vendor.yml file for a list of these exclusions.

    Pull requests with new exclusion patterns are always welcome.

    So if your javascsript/css files match a regexp in that Yaml file they shouldn’t be included in the stats. If they don’t, you could add them and create a pull-request.

    0 讨论(0)
  • 2021-01-01 12:29

    By default, Linguist treats all of the paths defined in vendor.yml as vendored and therefore doesn't include them in the language statistics for a repository.

    Use the linguist-vendored attribute to vendor or un-vendor paths.

    $ cat .gitattributes
    special-vendored-path/* linguist-vendored
    jquery.js linguist-vendored=false
    
    0 讨论(0)
提交回复
热议问题