diff --git a/.rubocop.yml b/.rubocop.yml index e78c2213a..619e09a88 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -11,13 +11,13 @@ require: AllCops: Exclude: - - 'Guardfile' - - 'Rakefile' - - 'bin/**/*' - - 'config/**/*' - - 'spec/fixtures/**/*' - - 'vendor/**/*' - - 'node_modules/**/*' + - "Guardfile" + - "Rakefile" + - "bin/**/*" + - "config/**/*" + - "spec/fixtures/**/*" + - "vendor/**/*" + - "node_modules/**/*" TargetRubyVersion: 3.1 Rails: @@ -30,20 +30,20 @@ Style/StringLiterals: Layout/LineLength: Max: 120 Exclude: - - 'spec/**/*' + - "spec/**/*" Lint/MissingSuper: Exclude: - - 'app/components/**/*' + - "app/components/**/*" Metrics/BlockLength: Exclude: - - 'spec/**/*' + - "spec/**/*" Metrics/ParameterLists: Max: 6 Exclude: - - 'spec/rails_helper.rb' + - "spec/rails_helper.rb" RSpec/MultipleExpectations: Enabled: false @@ -517,4 +517,58 @@ RSpec/RemoveConst: # new in 2.26 RSpec/RepeatedSubjectCall: # new in 2.27 Enabled: true RSpec/UndescriptiveLiteralsDescription: # new in 2.29 - Enabled: true \ No newline at end of file + Enabled: true +Gemspec/AddRuntimeDependency: # new in 1.65 + Enabled: true +Lint/ConstantReassignment: # new in 1.70 + Enabled: true +Lint/DuplicateSetElement: # new in 1.67 + Enabled: true +Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69 + Enabled: true +Lint/NumericOperationWithConstantResult: # new in 1.69 + Enabled: true +Lint/SharedMutableDefault: # new in 1.70 + Enabled: true +Lint/UnescapedBracketInRegexp: # new in 1.68 + Enabled: true +Lint/UselessDefined: # new in 1.69 + Enabled: true +Lint/UselessNumericOperation: # new in 1.66 + Enabled: true +Style/AmbiguousEndlessMethodDefinition: # new in 1.68 + Enabled: true +Style/BitwisePredicate: # new in 1.68 + Enabled: true +Style/CombinableDefined: # new in 1.68 + Enabled: true +Style/DigChain: # new in 1.69 + Enabled: true +Style/FileNull: # new in 1.69 + Enabled: true +Style/FileTouch: # new in 1.69 + Enabled: true +Style/ItAssignment: # new in 1.70 + Enabled: true +Style/KeywordArgumentsMerging: # new in 1.68 + Enabled: true +Style/RedundantInterpolationUnfreeze: # new in 1.66 + Enabled: true +Style/SafeNavigationChainLength: # new in 1.68 + Enabled: true +Style/SendWithLiteralMethodName: # new in 1.64 + Enabled: true +Style/SuperArguments: # new in 1.64 + Enabled: true +Rails/EnumSyntax: # new in 2.26 + Enabled: true +Rails/MultipleRoutePaths: # new in 2.29 + Enabled: true +Rails/StrongParametersExpect: # new in 2.29 + Enabled: true +Rails/WhereRange: # new in 2.25 + Enabled: true +Performance/StringBytesize: # new in 1.23 + Enabled: true +RSpec/StringAsInstanceDoubleConstant: # new in 3.1 + Enabled: true diff --git a/lib/bcp47/record.rb b/lib/bcp47/record.rb index 97ad94477..7cb58d63a 100644 --- a/lib/bcp47/record.rb +++ b/lib/bcp47/record.rb @@ -31,7 +31,7 @@ def self.parse(record_string) record_string .gsub(FOLDED_LINE, ' ') .split("\n") - .filter_map { |line| FIELD_PATTERN.match(line)&.named_captures&.slice('field_name', 'field_body')&.values } + .filter_map { |line| FIELD_PATTERN.match(line)&.named_captures&.slice('field_name', 'field_body')&.values } # rubocop:disable Style/SafeNavigationChainLength ) end