Skip to content
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

split out guideline_name_match_check #551

Merged
merged 3 commits into from
Jan 31, 2024
Merged

Conversation

ericphanson
Copy link
Member

This part should not be overridable by labels. (Note this isn't a huge issue, since the consistency tests seem to catch this already, but it is helpful to have the logic clear here and to give a good message even if the label is applied removing the similarity check).

@DilumAluthge
Copy link
Member

Can you add a comment somewhere saying explicitly that this check is not label-overridable? (I quickly skimmed the diff but didn't see such a comment.)

Comment on lines +335 to +336
# We handle this case in `meets_name_match_check`
continue
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems like it would be fine to just return false here, right? Instead of continuing?

Suggested change
# We handle this case in `meets_name_match_check`
continue
# We can short-circuit in this case.
return (false, "Package name matches existing package name $(other_pkg) up to case.")

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's still nice to show the list of other problems, because it helps tell them what other similar names also exist that they shouldn't use (since they will have to change their name already and might want to choose something similar)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I see. If we short-circuit now, then they don't get the full list of other name similarities.

@ericphanson ericphanson added this pull request to the merge queue Jan 31, 2024
Merged via the queue into master with commit ee1d7cd Jan 31, 2024
11 checks passed
@ericphanson ericphanson deleted the eph/split-distance-check branch January 31, 2024 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants