New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposal: Check outlying precision while running linter #3750
Proposal: Check outlying precision while running linter #3750
Conversation
f194914
to
5d21453
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detailed review so far @mondeja and thanks for the suggestion @service-paradis. I definitely like the upper bound to ensure small file sizes (whether 5 is the correct value is debatable but that can be changed if needed). I'm not so font of the lower bound, if an icon can work with a precision of 0
or 1
that's great! Unfortunately, I think we will need to leave icons with a precision that is too low to manual reviews... Thoughts?
Two question
- Is "average precision" the right choice here? Shouldn't we be looking at the maximum precision?
- I'm surprised by the number of ignored cases in
.svglint-ignored.json
, in Review of icons with outlying precision levels #3120 (and The Great 2020 Icon Review #3169) there are only 38 icons listed. I'm not sure how we got the lists there, maybe that was done manually... Anyway, any idea why there is a discrepancy?
I agree with you, @ericcornelissen. Discrepances in 0.01 pixel ranges and lower are easy to check reviewing manually and can be uploaded an icon with path fitting entirely in integer points.
|
Thanks for the feedback!
The number of ignored icon is way less this way! |
Issue: #3120, #3169
Description
Only a proposal and some adjustments might be needed.
I added a custom lint check to verify the average precision level. I report an error and update the ignored list if the average precision level is below or above a defined treshold. I used the values that were indicated in #3120. The error reported looks like this:
Precision level should be between ${iconMinFloatPrecision} and ${iconMaxFloatPrecision}; the average is currently ${precisionAverage}
Ex.