Skip to content

Explain EXCLUDED_LANGS casing or make it case-insensitive #64

Closed

Description

@erikw

The current implementation expects the languages to be in the same style as displayed on GitHub e.g.

  • HTML, not html
  • Ruby, not ruby

My first instict when I set up EXCLUDED_LANGS was to make something like html,tex. Not until reading the source code I saw that the code expects the exclude list to be using the same casing as GitHub has. Thus to exclude HTML and Tex files, we must write HTML,TeX.

I propose one of these:

  • We make the lookup case-insensitive i.e. normalize both each repo's languages and the user's set EXCLUDED_LANGS to lower-case.
    languages = await self.languages
    if name in self._exclude_langs:
  • If not, we should explain in the README that the EXCLUDED_LANGS should have languages as displayed in the generated image / as shown on the GitHub repo page

Activity

  1. jstrieb commented on Feb 15, 2022

    @jstrieb
    Owner

    Hey @erikw, thanks for the suggestion! I wholeheartedly agree that it should be a case-insensitive check. This is a good catch.

    Feel free to make a PR, otherwise I can push this change at some point.

  2. added 4 commits that reference this issue on Feb 16, 2022
    3df91a6
    92bc98c
    5613cda
    659343a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions