devicon icon indicating copy to clipboard operation
devicon copied to clipboard

[BUG] `check-bot` check `-original` icons even when they won't be added to icomoon

Open BenSouchet opened this issue 1 year ago • 1 comments

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

  • [X] Confirm

Bug description

Currently check-bot perform check operations related to icomoon specifications like the "no usage of stroke(s) attribute(s) in paths" even when the icons won't be included in the devicon font.

Possible fixes or solutions

When an icon -plain.svg exist in a PR, don't check -original.svg the icomoon rules. And also when an icon -plain-wordmark.svg exist in a PR, don't check -original-wordmark.svg the icomoon rules.

Additional information

No response

BenSouchet avatar Jul 27 '22 21:07 BenSouchet

The issue can be seen in this PR https://github.com/devicons/devicon/pull/1323

BenSouchet avatar Jul 27 '22 21:07 BenSouchet

The issue can also be seen in this PR: #1488

I think we can simplify the fix for this issue by simply checking the font attribute in devicon.json, which tells us whether or not the icon will be uploaded to icomoon. So pretty much, if the icon exists inside font, check the stroke property, otherwise it can be skipped.

Should only need to modify these lines then: https://github.com/devicons/devicon/blob/1119b9f84c0290e0f0b38982099a2bd027a48bf1/.github/scripts/check_icon_pr.py#L150-L153

Snailedlt avatar Oct 30 '22 20:10 Snailedlt