Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 11 additions & 31 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,14 @@
inherit_from: .rubocop_todo.yml
inherit_from:
- https://raw.githubusercontent.com/riboseinc/oss-guides/main/ci/rubocop.yml
- .rubocop_todo.yml

plugins:
- rubocop-performance
- rubocop-rake
- rubocop-rspec

AllCops:
TargetRubyVersion: 3.0
NewCops: enable
SuggestExtensions: false
TargetRubyVersion: 2.7

Gemspec/DevelopmentDependencies:
Enabled: false

Gemspec/RequireMFA:
Enabled: false

Metrics/BlockLength:
AllowedMethods:
- describe

Style/Documentation:
Enabled: false

Style/StringLiterals:
EnforcedStyle: double_quotes

Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes

Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: consistent_comma

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
Exclude:
- 'vendor/**/*'
317 changes: 286 additions & 31 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,321 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2025-01-11 09:46:54 UTC using RuboCop version 1.70.0.
# on 2025-12-01 12:15:10 UTC using RuboCop version 1.81.7.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 4
# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation.
Bundler/OrderedGems:
Exclude:
- 'Gemfile'

# Offense count: 1
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
Lint/DuplicateBranch:
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Severity.
Gemspec/RequireMFA:
Exclude:
- 'genericode.gemspec'

# Offense count: 1
# Configuration parameters: Severity.
Gemspec/RequiredRubyVersion:
Exclude:
- 'genericode.gemspec'

# Offense count: 36
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_argument, with_fixed_indentation
Layout/ArgumentAlignment:
Exclude:
- 'lib/genericode/cli/code_lister.rb'
- 'lib/genericode/cli/commands.rb'
- 'lib/genericode/cli/converter.rb'
- 'lib/genericode/cli/validator.rb'
- 'lib/genericode/identification.rb'
- 'spec/genericode/cli/code_lookup_spec.rb'
- 'spec/genericode/cli/commands_spec.rb'
- 'spec/genericode/cli/converter_spec.rb'
- 'spec/genericode/cli/validator_spec.rb'
- 'spec/genericode/code_list_spec.rb'

# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: with_first_element, with_fixed_indentation
Layout/ArrayAlignment:
Exclude:
- 'genericode.gemspec'
- 'lib/genericode/cli/converter.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: IndentationWidth.
Layout/AssignmentIndentation:
Exclude:
- 'lib/genericode/agency.rb'
- 'lib/genericode/identification.rb'

# Offense count: 18
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleAlignWith.
# SupportedStylesAlignWith: either, start_of_block, start_of_line
Layout/BlockAlignment:
Exclude:
- 'lib/genericode/code_list.rb'
- 'lib/genericode/key.rb'
- 'spec/genericode/cli/commands_spec.rb'
- 'spec/genericode/cli/validator_spec.rb'
- 'spec/genericode/code_list_spec.rb'
- 'spec/genericode_spec.rb'

# Offense count: 18
# This cop supports safe autocorrection (--autocorrect).
Layout/BlockEndNewline:
Exclude:
- 'lib/genericode/code_list.rb'
- 'lib/genericode/key.rb'
- 'spec/genericode/cli/commands_spec.rb'
- 'spec/genericode/cli/validator_spec.rb'
- 'spec/genericode/code_list_spec.rb'
- 'spec/genericode_spec.rb'

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
Layout/ClosingParenthesisIndentation:
Exclude:
- 'spec/genericode/cli/commands_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AutoCorrect, CheckForMethodsWithNoSideEffects.
Lint/Void:
Layout/EmptyLineAfterGuardClause:
Exclude:
- 'lib/genericode/cli/converter.rb'

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, IndentationWidth.
# SupportedStyles: consistent, consistent_relative_to_receiver, special_for_inner_method_call, special_for_inner_method_call_in_parentheses
Layout/FirstArgumentIndentation:
Exclude:
- 'spec/genericode/cli/commands_spec.rb'

# Offense count: 42
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
# SupportedHashRocketStyles: key, separator, table
# SupportedColonStyles: key, separator, table
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
Layout/HashAlignment:
Exclude:
- 'genericode.gemspec'
- 'lib/genericode/agency.rb'
- 'lib/genericode/cli/commands.rb'
- 'lib/genericode/code_list.rb'
- 'lib/genericode/code_list_ref.rb'
- 'lib/genericode/code_list_set.rb'
- 'lib/genericode/code_list_set_ref.rb'
- 'lib/genericode/column.rb'
- 'lib/genericode/datatype_facet.rb'
- 'lib/genericode/identification.rb'
- 'lib/genericode/key.rb'
- 'spec/genericode/code_list_spec.rb'

# Offense count: 8
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 182
# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: normal, indented_internal_methods
Layout/IndentationConsistency:
Exclude:
- 'genericode.gemspec'

# Offense count: 2
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
# AllowedMethods: refine
Metrics/BlockLength:
Max: 34
# Offense count: 36
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Width, AllowedPatterns.
Layout/IndentationWidth:
Exclude:
- 'lib/genericode/code_list.rb'
- 'lib/genericode/key.rb'
- 'spec/genericode/cli/commands_spec.rb'
- 'spec/genericode/cli/validator_spec.rb'
- 'spec/genericode/code_list_spec.rb'
- 'spec/genericode_spec.rb'

# Offense count: 153
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
# URISchemes: http, https
Layout/LineLength:
Enabled: false

# Offense count: 4
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: symmetrical, new_line, same_line
Layout/MultilineMethodCallBraceLayout:
Exclude:
- 'spec/genericode/cli/commands_spec.rb'

# Offense count: 60
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowInHeredoc.
Layout/TrailingWhitespace:
Enabled: false

# Offense count: 1
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 216
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches, IgnoreDuplicateElseBranch.
Lint/DuplicateBranch:
Exclude:
- 'lib/genericode/code_list.rb'

# Offense count: 11
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
Metrics/AbcSize:
Exclude:
- 'lib/genericode/cli/code_lister.rb'
- 'lib/genericode/cli/commands.rb'
- 'lib/genericode/cli/validator.rb'
- 'lib/genericode/code_list.rb'
- 'lib/genericode/code_list_set.rb'
- 'spec/genericode_spec.rb'

# Offense count: 5
# Configuration parameters: AllowedMethods, AllowedPatterns.
# Offense count: 7
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
Metrics/CyclomaticComplexity:
Max: 92
Exclude:
- 'lib/genericode/cli/code_lister.rb'
- 'lib/genericode/cli/validator.rb'
- 'lib/genericode/code_list.rb'
- 'lib/genericode/code_list_set.rb'

# Offense count: 10
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 86
Max: 112

# Offense count: 3
# Configuration parameters: AllowedMethods, AllowedPatterns.
# Offense count: 8
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
Metrics/PerceivedComplexity:
Max: 92
Exclude:
- 'lib/genericode/cli/code_lister.rb'
- 'lib/genericode/cli/commands.rb'
- 'lib/genericode/cli/validator.rb'
- 'lib/genericode/code_list.rb'
- 'lib/genericode/code_list_set.rb'

# Offense count: 2
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
# AllowedMethods: call
# WaywardPredicates: nonzero?
Naming/PredicateMethod:
Exclude:
- 'lib/genericode/cli/converter.rb'
- 'lib/genericode/cli/validator.rb'

# Offense count: 2
RSpec/AnyInstance:
Exclude:
- 'spec/genericode/cli/converter_spec.rb'

# Offense count: 17
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
# SupportedStyles: described_class, explicit
RSpec/DescribedClass:
Exclude:
- 'spec/genericode/cli/code_lister_spec.rb'
- 'spec/genericode/cli/code_lookup_spec.rb'
- 'spec/genericode/cli/converter_spec.rb'
- 'spec/genericode/cli/validator_spec.rb'

# Offense count: 17
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 23

# Offense count: 2
RSpec/LeakyLocalVariable:
Exclude:
- 'spec/genericode/code_list_spec.rb'

# Offense count: 1
RSpec/MultipleExpectations:
Max: 3

# Offense count: 2
# Configuration parameters: AllowedPatterns.
# AllowedPatterns: ^expect_, ^assert_
RSpec/NoExpectationExample:
Exclude:
- 'spec/genericode_spec.rb'

# Offense count: 6
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/ReceiveMessages:
Exclude:
- 'spec/genericode/cli/validator_spec.rb'

# Offense count: 30
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
# URISchemes: http, https
Layout/LineLength:
Max: 121
# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, AllowedMethods, AllowedPatterns, AllowBracesOnProceduralOneLiners, BracesRequiredMethods.
# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces
# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object
# FunctionalMethods: let, let!, subject, watch
# AllowedMethods: lambda, proc, it
Style/BlockDelimiters:
Exclude:
- 'lib/genericode/code_list.rb'
- 'lib/genericode/key.rb'
- 'spec/genericode/cli/commands_spec.rb'
- 'spec/genericode/cli/validator_spec.rb'
- 'spec/genericode/code_list_spec.rb'
- 'spec/genericode_spec.rb'

# Offense count: 7
# This cop supports safe autocorrection (--autocorrect).
Style/MultilineIfModifier:
Exclude:
- 'lib/genericode/cli/code_lister.rb'
- 'lib/genericode/cli/converter.rb'
- 'lib/genericode/cli/validator.rb'
- 'lib/genericode/code_list_set.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
# SupportedStyles: single_quotes, double_quotes
Style/StringLiterals:
Exclude:
- 'genericode.gemspec'

# Offense count: 8
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
Style/TrailingCommaInArguments:
Exclude:
- 'spec/genericode/cli/code_lister_spec.rb'
- 'spec/genericode/cli/code_lookup_spec.rb'
- 'spec/genericode/cli/converter_spec.rb'
- 'spec/genericode/code_list_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
Style/TrailingCommaInArrayLiteral:
Exclude:
- 'lib/genericode/code_list.rb'

# Offense count: 11
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
Style/TrailingCommaInHashLiteral:
Exclude:
- 'lib/genericode/code_list.rb'
- 'lib/genericode/identification.rb'
Loading
Loading