From 6b15a073a277bcb91865f2d9492421719a42250a Mon Sep 17 00:00:00 2001 From: taitus Date: Thu, 10 Oct 2024 09:47:33 +0200 Subject: [PATCH] Add and apply Style/RedundantRegexpArgument RuboCop rule This rule was introduced in RuboCop 1.53.0. After adding the Style/RedundantRegexpCharacterClass rule in the previous commit, RuboCop started detecting redundant regular expression arguments. Therefore, we apply this rule to remove them and prevent future occurrences. --- .rubocop.yml | 3 +++ app/models/signature_sheet.rb | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.rubocop.yml b/.rubocop.yml index dacb743ae..adea1e858 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -781,6 +781,9 @@ Style/RedundantInterpolation: Style/RedundantParentheses: Enabled: true +Style/RedundantRegexpArgument: + Enabled: true + Style/RedundantRegexpCharacterClass: Enabled: true diff --git a/app/models/signature_sheet.rb b/app/models/signature_sheet.rb index 3f7462999..d123967be 100644 --- a/app/models/signature_sheet.rb +++ b/app/models/signature_sheet.rb @@ -39,7 +39,7 @@ class SignatureSheet < ApplicationRecord end def parsed_required_fields_to_verify_groups - required_fields_to_verify.split(/;/).map { |d| d.gsub(/\s+/, "") }.map { |group| group.split(/,/) } + required_fields_to_verify.split(";").map { |d| d.gsub(/\s+/, "") }.map { |group| group.split(",") } end def signable_found