Skip to content

Conversation

@issyl0
Copy link
Member

@issyl0 issyl0 commented Oct 21, 2025

  • 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?

  • We use the rubocop-md extension to lint the Ruby within our Markdown files. It parses Ruby code snippets out of Markdown files and runs RuboCop on them.
  • The docs/ directory has its own RuboCop configuration to handle which rules we enforce.
  • Copilot's instructions are made up of all our docs. Instead of adding a separate RuboCop config in places where we want Copilot instructions files to exist but not spew linting errors (say, Taps/homebrew/homebrew-core/.github/.rubocop.yml), let's ignore this Markdown file entirely.
  • Needed for Add Copilot instructions homebrew-core#250521 to pass brew style homebrew/core.

- We use the `rubocop-md` extension to lint the Ruby within our Markdown
  files. It parses Ruby code snippets out of Markdown files and runs
  RuboCop on them.
- The `docs/` directory has its own RuboCop configuration to handle
  which rules we enforce.
- Copilot's instructions are made up of all our docs. Instead of adding
  a separate RuboCop config in places where we want Copilot instructions
  files to exist but not spew linting errors (say,
  `Taps/homebrew/homebrew-core/.github/.rubocop.yml`), let's ignore this
  Markdown file entirely.
Copilot AI review requested due to automatic review settings October 21, 2025 19:38
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 excludes Copilot instructions files from RuboCop linting to prevent unnecessary style violations in documentation that incorporates code from various sources. The change allows .github/copilot-instructions.md files across the codebase to be treated consistently with other documentation files that have relaxed linting rules.

Key Changes:

  • Added .github/copilot-instructions.md to RuboCop's exclusion list under AllCops

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.

Thanks Issy!

@p-linnane p-linnane added this pull request to the merge queue Oct 21, 2025
Merged via the queue into main with commit f050a90 Oct 21, 2025
37 checks passed
@p-linnane p-linnane deleted the rubocop-md-ignore-copilot-instructions-file branch October 21, 2025 23:21
@MikeMcQuaid
Copy link
Member

Thanks @issyl0!

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.

5 participants