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

Disable cop for #set_cpu_flags, #set_cpu_cflags #5500

Merged
merged 1 commit into from
Jan 8, 2019
Merged

Disable cop for #set_cpu_flags, #set_cpu_cflags #5500

merged 1 commit into from
Jan 8, 2019

Conversation

claui
Copy link
Contributor

@claui claui commented Jan 8, 2019

  • 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. No tests, just disabling a cop
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally? No tests

In extend/ENV/std.rb, the methods set_cpu_flags and set_cpu_cflags have been violating the Naming/AccessorMethodName cop.

One of the changes in #5491 appears to have awakened the cop. That means we’re likely dealing with legacy code here, predating the introduction of RuboCop into Homebrew.

This PR disables the cop for either method. I believe refactoring wouldn’t currently be worth the effort, especially given that #set_cpu_cflags is now mostly called without arguments.

In `extend/ENV/std.rb`, the methods `set_cpu_flags` and
`set_cpu_cflags` have been violating the `Naming/AccessorMethodName`
cop.

A recent modification in #7e13b3749 woke up the cop. That means we’re
likely dealing with legacy code here, predating the introduction of
RuboCop into Homebrew.

This commit disables the cop for either method. I believe refactoring
wouldn’t currently be worth the effort, especially given that
`#set_cpu_cflags` is mostly called without arguments.
@claui
Copy link
Contributor Author

claui commented Jan 8, 2019

Pinging @sjackman and @MikeMcQuaid for a second opinion, thanks in advance!

@MikeMcQuaid
Copy link
Member

Thanks for the PR but I'd like to be able to reproduce this brew style failure both locally and in CI before we merge this.

@MikeMcQuaid
Copy link
Member

Reproduced the issue in #5497 so merging this. Thanks @claui!

@MikeMcQuaid
Copy link
Member

(after rerunning build for 💚)

@MikeMcQuaid MikeMcQuaid merged commit 5d602a3 into Homebrew:master Jan 8, 2019
@claui claui deleted the fix-cop-set-writer branch January 8, 2019 12:46
@claui claui mentioned this pull request Jan 8, 2019
6 tasks
@sjackman
Copy link
Contributor

sjackman commented Jan 8, 2019

Docker Hub is back to 💚. Thanks, Claudia!

@lock lock bot added the outdated PR was locked due to age label Feb 7, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Feb 7, 2019
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.

3 participants