-
Notifications
You must be signed in to change notification settings - Fork 9
Introduce #[IsNotEnabled] attribute to complement #[IsEnabled] #33
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
Conversation
ad18dff
to
cd57d1e
Compare
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.
Thanks! Overall looks good, though I requested some changes, most of them are for consistency.
Signed-off-by: Quentin Devos <4972091+Okhoshi@users.noreply.github.com>
cd57d1e
to
2c449d6
Compare
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.
Looks nice! I'll do a re-review tomorrow when I'm less tired but so far I can't find anything wrong with it.
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.
Looks good! I'll be releasing this tomorrow.
Description
The
#[IsEnabled]
attribute is really helpful but can't help with negated flags, such as kill switches. The#[IsNotEnabled]
attribute introduced in this PR aims to fill the need, by just reversing the throwing logic, but keep reusing the infrastructure already in place.Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Checklist:
NB: I couldn't find the tests in this repo, did I miss something ?