devicons / devicon

Set of icons representing programming languages, designing & development tools
https://devicon.dev
MIT License
9.91k stars 2.32k forks source link

[FEATURE REQUEST] Make `check-bot` check that base and alias have different values. #1486

Open Snailedlt opened 2 years ago

Snailedlt commented 2 years ago

I have searched through the issues and didn't find my problem.

Problem

Currently it's possible to add a new entry to devicon.json with the following code:

"aliases": [
            {
                "base": "plain",
                "alias": "plain"
            }
        ]

Notice how the base and alias have the same value (plain). This does not make any sense, since the aliases attribute serves as a way to generate multiple font icon class name from just one SVG file (ref the documentation for aliases). So having plain as both an alias and base would only duplicate the class name.

Therefore we should make a check that fails if the base and alias are the same.

Possible Solution

It should be possible to add an extra check to our existing check-bot, in this script: https://github.com/devicons/devicon/blob/master/.github/scripts/check_icon_pr.py

Additional information

No response

Snailedlt commented 2 years ago

related to #1487 , specifically the devicon-schema.json: 97-210, which also checks that alias and base don't have the same names