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

Adding the summary section #72

Merged
merged 6 commits into from
Jul 24, 2024
Merged

Conversation

Kapple14
Copy link
Contributor

Hi!

I have just seen that the summary section for the project was still not implemented, so I have done the table styling

This pull request makes the following changes:

  • Adding the summary table at the end
  • Using the already build get_summary_message function
  • Formatting the table and making the output red
  • No changes to the user behaviour

It relates to the following issue #s:

Here I have added some basic styling for the table to display the number of vulnerabilities in red. Furthermore, I have removed the placeholder texts with the actual output.
@bhamail
Copy link
Contributor

bhamail commented Jun 25, 2024

Thanks for the PR! You've motivated me to get the main build working. Would you mind merging in the latest from main? That should get you a happy branch build.

Copy link
Contributor

@bhamail bhamail left a comment

Choose a reason for hiding this comment

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

+1

]));
table.add_row(Row::new(vec![
TableCell::new("Vulnerable Dependencies"),
TableCell::new_with_col_span(style(vulnerability_count as u32).red(), 1),
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: remove cast

Suggested change
TableCell::new_with_col_span(style(vulnerability_count as u32).red(), 1),
TableCell::new_with_col_span(style(vulnerability_count).red(), 1),

Copy link
Contributor

@bhamail bhamail left a comment

Choose a reason for hiding this comment

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

+1

table.add_row(Row::new(vec![TableCell::new("Summary")]));
table.add_row(Row::new(vec![
TableCell::new("Audited Dependencies"),
TableCell::new_with_col_span(component_count as u32, 1),
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: could remove explicit cast: as u32

Suggested change
TableCell::new_with_col_span(component_count as u32, 1),
TableCell::new_with_col_span(component_count, 1),

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you are right. The as u32 is obsolete there. I am happy that you have seen it.

@bhamail bhamail merged commit 1ae90f1 into sonatype-nexus-community:main Jul 24, 2024
1 of 4 checks passed
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.

Provide Summary block of what cargo-pants finds
2 participants