-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 vulnerable option to dotnet list package #13318
Add vulnerable option to dotnet list package #13318
Conversation
/// these options must not be used, so error is thrown. | ||
/// </summary> | ||
/// <param name="option"></param> | ||
private void CheckForOutdatedOrDeprecated(string option) | ||
private void CheckForOnlineOptions(string option) |
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.
nit: what does "Online" mean
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.
Options that require online lookups to services for their information
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.
(code removed per main comment above)
{ | ||
if (!_appliedCommand.HasOption("deprecated") && !_appliedCommand.HasOption("outdated")) | ||
if (!_appliedCommand.HasOption("deprecated") && !_appliedCommand.HasOption("outdated") && !_appliedCommand.HasOption("vulnerable")) |
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.
test coverage?
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.
Added
fb9c6c0
to
c5fc6b8
Compare
c5fc6b8
to
a3daf70
Compare
a3daf70
to
ea4fde6
Compare
@drewgillies merging this into master for 6.0. If you want this included in 5.0.2xx, you'll need to port it over once we have that servicing branch (~1 month out) |
Added
--vulnerable
option todotnet list package
CLI. Also removed most of the "policing" around other option combinations:--include-prerelease
,--highest-minor
, andhighest-patch
are only supposed to be used in combination with the--outdated
option, but they're just ignored by the NuGet Xplat CLI otherwise, and we'll do the same here.--config
and--source
are only supposed to be used in combination with--vulnerable
,--outdated
and--deprecated
reports, but they're also just ignored by the NuGet Xplat CLI, so we'll ignore them here.--vulnerable
,--outdated
and--deprecated
all must be used mutually exclusively, and combining them is nonsense--we throw in the NuGet Xplat CLI in this case, and we'll continue to throw here.