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
.rubocop: tweak rules. #4797
.rubocop: tweak rules. #4797
Conversation
With these changes there's only a single complaint in homebrew/core which will be fixed in Homebrew/homebrew-core#31709 |
Library/.rubocop.yml
Outdated
Layout/IndentHeredoc: | ||
EnforcedStyle: squiggly | ||
|
||
# conflicts with DSL-style path concatenation with `/` | ||
Layout/SpaceAroundOperators: | ||
Enabled: false | ||
|
||
# favor parens-less DSL-style arguments | ||
# # favor parens-less DSL-style arguments |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the second #
a typo?
(Also favor? 🇺🇸 👀, heh)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, fixing (both 😉)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a few of both here but I won't point them all out to avoid you wanting to prod me with a stick, justifiably 😄
Library/.rubocop.yml
Outdated
Metrics/PerceivedComplexity: | ||
# GitHub diff UI wraps beyond 118 characters (so that's the goal) | ||
Metrics/LineLength: | ||
Max: 189 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't object to knocking this down a bit, FWIW. I have a file locally of all the core formulae that have overly long lines, which I've started working through. I think 150 is doable fairly quickly.
Soon to be flagged by `brew style` in Homebrew/brew#4797 Closes #31709. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Adjust the rules based on the current codebase. Remove various enable, disables and default values that are unnecessary. Add more comments explaining why. Make minor changes needed to enable a few more rules.
6aaa77c
to
80d75bc
Compare
@DomT4 I'm game to take it down the whole way at some point but yeh: any help before that'd be welcome 👍 |
Aye, I think periodically reducing the number is a solid way to go. After Homebrew/homebrew-core#31712 is folded in (it'll fail CI, but for previously known reasons) we'll be down to 94 non-exempt lines over 150 characters in core. |
Adjust the rules based on the current codebase. Remove various enable, disables and default values that are unnecessary. Add more comments explaining why. Make minor changes needed to enable a few more rules.
brew style
with your changes locally?brew tests
with your changes locally?