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

Add value for NU1507 warning string format item #4533

Merged
merged 2 commits into from
Apr 4, 2022

Conversation

tlmii
Copy link
Contributor

@tlmii tlmii commented Mar 30, 2022

Bug

Fixes: NuGet/Home#11709

Regression? Last working version: Not a regression

Description

It looks like #4505 missed calling string.Format and passing the value when the warning text was changed to include a format item for the number of sources. This PR corrects that.

Note that this doesn't address all of the points in NuGet/Home#11709, just the main one of the missing value, so I don't think completing this PR should close that one.

PR Checklist

  • PR has a meaningful title

  • PR has a linked issue.

  • Described changes

  • Tests

    • Automated tests added
    • OR
    • Test exception
    • OR
    • N/A
  • Documentation

    • Documentation PR or issue filled
    • OR
    • N/A

@tlmii tlmii requested a review from a team as a code owner March 30, 2022 23:40
@ghost ghost added the Community PRs created by someone not in the NuGet team label Mar 30, 2022
@jeffkl jeffkl self-assigned this Mar 31, 2022
@jeffkl
Copy link
Contributor

jeffkl commented Mar 31, 2022

Thanks @tlmii, I've pushed an update to the unit test to your branch as well

@nkolev92
Copy link
Member

@jeffkl
Do you think adding the names of the sources would be helpful?

There are many ways to add sources, NuGet.Config, RestoreSources, RestoreAdditionalProjectSources etc.
It can be difficult to find the sources sometimes and having the names would help.

@nkolev92
Copy link
Member

should we be considering this change for 17.2 as well? @jeffkl

@tlmii
Copy link
Contributor Author

tlmii commented Mar 31, 2022

Thanks @tlmii, I've pushed an update to the unit test to your branch as well

Thanks @jeffkl . I wasn't sure if it was safe to do the string check that way (localization, etc) but good to see we can have that check in there.

@jeffkl
Copy link
Contributor

jeffkl commented Apr 4, 2022

The plan is to merge this into dev and cherry-pick for 17.2 so we can take it to shiproom

@jeffkl jeffkl merged commit 29af687 into NuGet:dev Apr 4, 2022
@jeffkl
Copy link
Contributor

jeffkl commented Apr 4, 2022

Can you please make sure the issue is created. @jeffkl

NuGet/Home#11715

@tlmii tlmii deleted the dev-fix-missing-nu1507-format-item branch April 8, 2022 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community PRs created by someone not in the NuGet team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: new warning for package source mappings doesn't pass a value for the resource string placeholder
4 participants