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

Remove need for separate .rubocop_cask.yml. #8542

Merged
merged 5 commits into from
Sep 1, 2020

Conversation

reitermarkus
Copy link
Member

@reitermarkus reitermarkus commented Aug 30, 2020

  • 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 tests with your changes locally?

Cask cops only run on cask "…" do blocks, so we can just enable them globally.

Sorry, something went wrong.

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.

Nice cleanup!

@reitermarkus reitermarkus merged commit 05f3888 into Homebrew:master Sep 1, 2020
@reitermarkus reitermarkus deleted the rubocop-cask branch September 1, 2020 12:44
@claui
Copy link
Contributor

claui commented Sep 3, 2020

This breaks brew audit Formula/myformula.rb if you’re in a working copy of a git cloned tap.

I don’t speak RuboCop so I tried several shots in the dark, i. e. removing the Taps/*/*/ part in all the Exclude directives. That didn’t work though.

This variant of brew audit has worked for years and I’d be super happy to get this working again. @reitermarkus Can you help?

@reitermarkus
Copy link
Member Author

@claui what exactly is not working anymore?

Maybe try changing the excludes from Taps/**/Formula/*.rb to just **/Formula/*.rb.

@claui
Copy link
Contributor

claui commented Sep 3, 2020

what exactly is not working anymore?

@reitermarkus The audit now reports findings that don’t really make sense for formulae. For example:

$ brew audit Formula/node.rb
node:
  * C: 1: col 1: Missing top-level class documentation comment.
  * C: 1: col 1: Missing frozen string literal comment.
  * C: 32: col 3: Assignment Branch Condition size for install is too high. [<3, 33, 2> 33.2/17]
  * C: 32: col 3: Method has too many lines. [14/10]
  * C: 53: col 13: Align the arguments of a method call if they span more than one line.
  * C: 65: col 3: Assignment Branch Condition size for post_install is too high. [<2, 25, 1> 25.1/17]
  * C: 65: col 3: Method has too many lines. [12/10]
  * Formula has other versions so create an alias named node@14.
Error: 8 problems in 1 formula detected

@reitermarkus
Copy link
Member Author

@claui, remove the / in front of the paths.

@claui
Copy link
Contributor

claui commented Sep 3, 2020

@reitermarkus I’ve already tried that but it wouldn’t work because Rubocop interprets it relative to the YAML file’s location.

@claui claui mentioned this pull request Sep 3, 2020
6 tasks
@MikeMcQuaid
Copy link
Member

@reitermarkus I think this has made brew style --fix --display-cop-names homebrew/bundle now check the vendor directory in that tap.

@reitermarkus
Copy link
Member Author

@MikeMcQuaid when does it create a vendor directory? bundle install doesn't create it for me locally.

@MikeMcQuaid
Copy link
Member

@reitermarkus I've got a global BUNDLE_PATH: "vendor/ruby" set which may be related. Ignoring vendor would be nice in general, I think, although arguably there should be per-repo configuration there?

@reitermarkus
Copy link
Member Author

I actually think I removed it because vendor/**/* is ignored by default. Maybe just adding **/vendor/**/* will fix it.

@BrewTestBot BrewTestBot added the outdated PR was locked due to age label Dec 12, 2020
@Homebrew Homebrew locked as resolved and limited conversation to collaborators Dec 12, 2020
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