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

audit: limit non-failure cask output #10896

Merged
merged 5 commits into from Mar 23, 2021

Conversation

Rylan12
Copy link
Member

@Rylan12 Rylan12 commented Mar 21, 2021

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example.
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew typecheck with your changes locally?
  • Have you successfully run brew tests with your changes locally?

This PR changes how brew audit outputs cask audit summaries.

By default, brew audit will not output any passed messaging unless --verbose is passed or there was only one named argument. Warnings will still be shown.

If the --display-failures-only flag is passed, warnings will also be silenced.

I added the --display-failures-only flag to the brew audit calls in the tests workflow. I don't think there's a benefit to seeing the huge number of warnings in this situation. Warnings don't block CI here, so there's no point in showing them as it makes it harder to read when there are failures.

@BrewTestBot
Copy link
Member

Review period will end on 2021-03-23 at 00:00:00 UTC.

@BrewTestBot BrewTestBot added the waiting for feedback Merging is blocked until sufficient time has passed for review label Mar 21, 2021
@@ -56,6 +56,8 @@ def audit_args
switch "--display-filename",
description: "Prefix every line of output with the file or formula name being audited, to "\
"make output easy to grep."
switch "--display-failures-only",
description: "Only display casks that fail the audit. This is the default for formulae."
Copy link
Member

Choose a reason for hiding this comment

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

This is the default for formulae.

Is this because there are no warnings for formulae or are warnings actually hidden by default for formulae?

Copy link
Member Author

Choose a reason for hiding this comment

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

There are no warnings

Copy link
Member Author

Choose a reason for hiding this comment

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

But there's also no message shown if the audit succeeds. It's either no output or a list of problems.

Copy link
Member

@MikeMcQuaid MikeMcQuaid left a comment

Choose a reason for hiding this comment

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

👍🏻 this is a big improvement. I agree with specifically not outputting warnings for Casks in the way we're using it for CI.

@BrewTestBot
Copy link
Member

Review period ended.

@BrewTestBot BrewTestBot removed the waiting for feedback Merging is blocked until sufficient time has passed for review label Mar 23, 2021
@Rylan12 Rylan12 merged commit 9a355b0 into Homebrew:master Mar 23, 2021
@Rylan12 Rylan12 deleted the cask-audit-display-changes branch March 23, 2021 12:37
@github-actions github-actions bot added the outdated PR was locked due to age label Apr 23, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants