Skip to content

Conversation

@botantony
Copy link
Member

  • 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 lgtm (style, typechecking and tests) with your changes locally?

Signed-off-by: botantony <antonsm21@gmail.com>
Copilot AI review requested due to automatic review settings November 20, 2025 22:49
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds audit functionality to validate the conflicts_with stanza in cask definitions. The audit ensures that casks listed in the conflicts_with declaration actually exist in the core cask tap, helping catch typos and references to non-existent casks.

  • Adds audit_conflicts_with method to check for non-existent conflicting casks
  • Implements helper methods core_cask_tap and core_cask_tokens for cask token lookup
  • Adds comprehensive test coverage for the new audit functionality

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
Library/Homebrew/cask/audit.rb Implements the audit_conflicts_with method that validates conflicting cask tokens exist, plus helper methods to access core cask tokens
Library/Homebrew/test/cask/audit_spec.rb Adds three test contexts covering no conflicts, existing conflicts, and missing conflicts scenarios

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@botantony
Copy link
Member Author

I expected some audit failures, going to make a PR soon

Signed-off-by: botantony <antonsm21@gmail.com>
Copy link
Member

@p-linnane p-linnane left a comment

Choose a reason for hiding this comment

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

Awesome! I didn't even realize we weren't checking this.

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.

Thanks again @botantony!

@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 21, 2025
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 21, 2025
github-merge-queue bot pushed a commit that referenced this pull request Nov 21, 2025
cask/audit: audit `conflicts_with` stanza
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 21, 2025
@botantony botantony added this pull request to the merge queue Nov 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 21, 2025
@botantony botantony added this pull request to the merge queue Nov 21, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Nov 21, 2025
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Nov 21, 2025
Merged via the queue into main with commit 02b8b04 Nov 21, 2025
54 of 55 checks passed
@MikeMcQuaid MikeMcQuaid deleted the audit-conflicting-casks branch November 21, 2025 15:32
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.

4 participants