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:
taitus
2025-06-16 11:40:55 +02:00
parent d123297ba6
commit b9bffeb321
6 changed files with 15 additions and 7 deletions

View File

@@ -52,7 +52,7 @@ module ProposalsDashboardHelper
dashboard_action&.proposed_action?
end
def is_request_active(id)
def request_active?(id)
controller_name == "dashboard" && action_name == "new_request" && dashboard_action&.id == id
end