Skip to content

Fix canonicalization scoring when library shares package name #3551

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

Merged
merged 1 commit into from
Oct 25, 2023

Conversation

srawlins
Copy link
Member

The code and the comment for the code are opposite.


  • I’ve reviewed the contributor guide and applied the relevant portions to this PR.
Contribution guidelines:

Note that many Dart repos have a weekly cadence for reviewing PRs - please allow for some latency before initial review feedback.

The code and the comment for the code are opposite.
@srawlins
Copy link
Member Author

CC @goderbauer

@srawlins srawlins requested review from scheglov and keertip October 25, 2023 20:12
@@ -58,7 +58,7 @@ abstract mixin class Canonicalization
}

// Give a big boost if the library has the package name embedded in it.
if (library.package.namePieces.intersection(library.namePieces).isEmpty) {
if (library.package.namePieces.intersection(library.namePieces).isNotEmpty) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It is curious that there are no test changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oof I agree. There is minimal testing of this whole method. I will add a TODO and look into adding some unit tests.

@srawlins srawlins merged commit 967cc54 into main Oct 25, 2023
@srawlins srawlins deleted the fix-package-name-canonicalization branch October 25, 2023 20:44
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