-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
formula: allow excluding deprecate!
reason when disable!
exists
#18661
base: master
Are you sure you want to change the base?
Conversation
Library/Homebrew/test/rubocops/deprecate_disable/reason_spec.rb
Outdated
Show resolved
Hide resolved
5cb0d67
to
c113c8e
Compare
For convenience, I've set Otherwise, would have to deal with resetting the info to |
This is a fantastic idea. Thanks @cho-m! |
class Foo < Formula | ||
url 'https://brew.sh/foo-1.0.tgz' | ||
disable! date: "2021-08-28", because: :does_not_build | ||
deprecate! date: "2020-08-28" |
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.
Not really relevant for this PR, but are these automatically sorted in this order by another cop? To me it would make more sense to have deprecate!
sorted first.
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.
It is from AST order:
brew/Library/Homebrew/ast_constants.rb
Lines 27 to 28 in 1d19230
[{ name: :disable!, type: :method_call }], | |
[{ name: :deprecate!, type: :method_call }], |
Could reverse them if we wanted, though would need to make sure about handling. I did try to add code so order doesn't matter.
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.
Will look into order in #18974 prior to continuing this PR.
Will wait until after #18733 is merged to finish this up. |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?