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

ISSUE-151 - Fix a bug where a report wasn't written if any warning #162

Conversation

jmcconnell26
Copy link
Contributor

was found:

  • When updating the scanning functions to return results as a vec of
    strings, a bug was introduced where the report would only be written
    if no warnings were returned

Signed-off-by: joshmc josh-mcc@tiscali.co.uk

@@ -115,7 +115,7 @@ fn scan_to_report(
root_package_id: PackageId,
scan_parameters: &ScanParameters,
workspace: &Workspace,
) -> Result<Vec<String>, CliError> {
) -> Result<(Vec<String>, u64), CliError> {
Copy link
Contributor

@anderejd anderejd Dec 6, 2020

Choose a reason for hiding this comment

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

A doc comment describing what this (Vec<String>, u64) represents would be nice, alternatively a dedicated struct with a descriptive name and descriptive member names.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sounds good! I've created the ScanResult struct to be returned as the result, if that looks OK?

Copy link
Contributor

Choose a reason for hiding this comment

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

LGTM

@jmcconnell26 jmcconnell26 force-pushed the ISSUE-151-FixNotWritingReportIfWarningFound branch from 9a14548 to abc9bfa Compare December 7, 2020 18:13
was found:
* When updating the scanning functions to return results as a vec of
  strings, a bug was introduced where the report would only be written
  if no warnings were returned
* Creating `ScanResult` struct to hold output from scan functions

Signed-off-by: joshmc <josh-mcc@tiscali.co.uk>
@jmcconnell26 jmcconnell26 force-pushed the ISSUE-151-FixNotWritingReportIfWarningFound branch from abc9bfa to 2e51b9a Compare December 7, 2020 18:22
@anderejd anderejd merged commit db35ec7 into geiger-rs:master Dec 7, 2020
@jmcconnell26 jmcconnell26 deleted the ISSUE-151-FixNotWritingReportIfWarningFound branch December 7, 2020 19:17
jmcconnell26 pushed a commit to jmcconnell26/cargo-geiger that referenced this pull request Dec 10, 2020
…itingReportIfWarningFound

ISSUE-151 - Fix a bug where a report wasn't written if any warning

Signed-off-by: joshmc <josh-mcc@tiscali.co.uk>
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