Add and apply Naming/PredicateMethod RuboCop 1.76 rule
This rule was introduced in RuboCop 1.76.0 to ensure methods ending in '?' return boolean. This commit applies suggested renames and code cleanup: - Renames 'is_active?' to 'active_class' since it returns a string - Renames 'parsed_value' to 'in_favor?' and 'is_request_active' to end with '?' for boolean semantics - Skips false positives like 'save', 'auto_labels' or 'save_requiring_finish_signup', which are not predicate methods.
This commit is contained in:
@@ -354,6 +354,14 @@ Naming/BlockForwarding:
|
||||
- "app/controllers/management/base_controller.rb"
|
||||
- "app/controllers/subscriptions_controller.rb"
|
||||
|
||||
Naming/PredicateMethod:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- "app/models/local_census_records/import.rb"
|
||||
- "app/models/user.rb"
|
||||
- "app/models/verification/management/email.rb"
|
||||
- "config/initializers/foundation_form_builder.rb"
|
||||
|
||||
Naming/RescuedExceptionsVariableName:
|
||||
Enabled: true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user