Skip to content

Commit

Permalink
Merge pull request #53 from fhir-crucible/FI-2332-Bump-to-Ruby-3
Browse files Browse the repository at this point in the history
FI-2332 Bump Ruby to 3
  • Loading branch information
360dgries authored Dec 26, 2023
2 parents 1e231a6 + 9f4c55f commit 29c3037
Show file tree
Hide file tree
Showing 146 changed files with 4,504 additions and 4,546 deletions.
2 changes: 1 addition & 1 deletion .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ engines:
enabled: true
rubocop:
enabled: true
channel: rubocop-0-80
channel: rubocop-1-23-0
ratings:
paths:
- "**.inc"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: ['2.7']
ruby-version: ['3.0', '3.1', '3.2']


steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 7 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
inherit_from: .rubocop_todo.yml
AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.0
Exclude:
- 'test/**/*'
- 'spec/**/*'
Expand All @@ -12,6 +12,10 @@ AllCops:
- 'bin/*'
Layout/LineLength:
Enabled: false
Lint/NonDeterministicRequireOrder:
Enabled: false
Style/AccessorGrouping:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: false
Style/HashEachMethods:
Expand All @@ -20,6 +24,8 @@ Style/HashTransformKeys:
Enabled: true
Style/HashTransformValues:
Enabled: true
Style/WordArray:
EnforcedStyle: brackets
inherit_mode:
merge:
- Exclude
217 changes: 56 additions & 161 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,172 +1,85 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2021-03-30 17:40:28 -0400 using RuboCop version 0.80.0.
# on 2023-12-13 21:05:46 UTC using RuboCop version 1.23.0.
# 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: 23
# Cop supports --auto-correct.
# Configuration parameters: IndentationWidth.
Layout/AssignmentIndentation:
Enabled: false

# Offense count: 55
# Cop supports --auto-correct.
Layout/EmptyLineAfterGuardClause:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/definitions.rb'
- 'lib/fhir_dstu2_models/bootstrap/generator.rb'
- 'lib/fhir_dstu2_models/bootstrap/hashable.rb'
- 'lib/fhir_dstu2_models/bootstrap/model.rb'
- 'lib/fhir_dstu2_models/bootstrap/preprocess.rb'
- 'lib/fhir_dstu2_models/bootstrap/xml.rb'
- 'lib/fhir_dstu2_models/deprecate.rb'
- 'lib/fhir_dstu2_models/fhir_ext/element_definition.rb'
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition_compare.rb'
- 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
- 'lib/fhir_dstu2_models/fluentpath/parse.rb'

# Offense count: 1
# Cop supports --auto-correct.
Layout/EmptyLines:
Exclude:
- 'lib/fhir_dstu2_models/fhir/resources/ClaimResponse.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only
Layout/EmptyLinesAroundClassBody:
Exclude:
- 'lib/fhir_dstu2_models/fhir/resources/ClaimResponse.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines
Layout/EmptyLinesAroundModuleBody:
Exclude:
- 'lib/fhir_dstu2_models/fhir/metadata.rb'

# Offense count: 1
# Cop supports --auto-correct.
Layout/RescueEnsureAlignment:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/hashable.rb'

# Offense count: 19223
# Cop supports --auto-correct.
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator.
# SupportedStylesForExponentOperator: space, no_space
Layout/SpaceAroundOperators:
Enabled: false

# Offense count: 10414
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces.
# SupportedStyles: space, no_space, compact
# SupportedStylesForEmptyBraces: space, no_space
Layout/SpaceInsideHashLiteralBraces:
Enabled: false

# Offense count: 120
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: final_newline, final_blank_line
Layout/TrailingEmptyLines:
Enabled: false

# Offense count: 23
# Cop supports --auto-correct.
# Configuration parameters: AllowInHeredoc.
Layout/TrailingWhitespace:
Enabled: false

# Offense count: 6
# Cop supports --auto-correct.
Lint/NonDeterministicRequireOrder:
Exclude:
- 'lib/fhir_dstu2_models.rb'

# Offense count: 2
# Cop supports --auto-correct.
Lint/ToJSON:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/json.rb'
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition_finding.rb'

# Offense count: 41
# Offense count: 40
# Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 461
Max: 533

# Offense count: 10
# Configuration parameters: CountComments, ExcludedMethods.
# ExcludedMethods: refine
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
# IgnoredMethods: refine
Metrics/BlockLength:
Max: 131
Max: 133

# Offense count: 45
# Configuration parameters: CountBlocks.
Metrics/BlockNesting:
Max: 6

# Offense count: 7
# Configuration parameters: CountComments.
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 470

# Offense count: 30
# Offense count: 36
# Configuration parameters: IgnoredMethods.
Metrics/CyclomaticComplexity:
Max: 142
Max: 156

# Offense count: 48
# Configuration parameters: CountComments, ExcludedMethods.
# Offense count: 49
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
Metrics/MethodLength:
Max: 463
Max: 466

# Offense count: 2
# Configuration parameters: CountComments.
# Configuration parameters: CountComments, CountAsOne.
Metrics/ModuleLength:
Max: 520
Max: 523

# Offense count: 28
# Offense count: 31
# Configuration parameters: IgnoredMethods.
Metrics/PerceivedComplexity:
Max: 145
Max: 160

# Offense count: 118
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
Enabled: false

# Offense count: 96
# Offense count: 1380
# Configuration parameters: EnforcedStyle, IgnoredPatterns.
# SupportedStyles: snake_case, camelCase
Naming/MethodName:
Enabled: false

# Offense count: 4
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: io, id, to, by, on, in, at, ip, db, os, pp
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
Exclude:
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition_compare.rb'

# Offense count: 2
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: PreferredName.
Naming/RescuedExceptionsVariableName:
# Configuration parameters: EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/hashable.rb'

# Offense count: 1
# Configuration parameters: .
# SupportedStyles: inline, group
Style/AccessModifierDeclarations:
EnforcedStyle: inline
- '.simplecov'

# Offense count: 19
Style/ClassVars:
Expand All @@ -175,7 +88,13 @@ Style/ClassVars:
- 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
- 'lib/fhir_dstu2_models/fluentpath/parse.rb'

# Offense count: 1
Style/CombinableLoops:
Exclude:
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition_compare.rb'

# Offense count: 6
# Cop supports --auto-correct.
Style/CommentedKeyword:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/hashable.rb'
Expand All @@ -190,9 +109,16 @@ Style/ConditionalAssignment:
- 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'

# Offense count: 358
# Configuration parameters: AllowedConstants.
Style/Documentation:
Enabled: false

# Offense count: 1
# Cop supports --auto-correct.
Style/GlobalStdStream:
Exclude:
- 'lib/fhir_dstu2_models/fhir.rb'

# Offense count: 16
# Configuration parameters: MinBodyLength.
Style/GuardClause:
Expand Down Expand Up @@ -228,21 +154,11 @@ Style/LambdaCall:
Exclude:
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'

# Offense count: 1
Style/MethodMissingSuper:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/model.rb'

# Offense count: 1
Style/MissingRespondToMissing:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/model.rb'

# Offense count: 3
Style/MultipleComparison:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/definitions.rb'

# Offense count: 494
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand All @@ -252,14 +168,21 @@ Style/MutableConstant:

# Offense count: 3
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
# Configuration parameters: EnforcedStyle, IgnoredMethods.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition_compare.rb'
- 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'

# Offense count: 2
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Style/OptionalBooleanParameter:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/generator.rb'
- 'lib/fhir_dstu2_models/bootstrap/template.rb'

# Offense count: 1
# Cop supports --auto-correct.
Style/OrAssignment:
Expand All @@ -268,43 +191,22 @@ Style/OrAssignment:

# Offense count: 1
# Cop supports --auto-correct.
Style/RedundantBegin:
Style/RedundantSelfAssignment:
Exclude:
- 'lib/fhir_dstu2_models/fluentpath/expression.rb'
- 'lib/fhir_dstu2_models/fhir_ext/element_definition.rb'

# Offense count: 6
# Cop supports --auto-correct.
Style/RescueModifier:
Exclude:
- 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'

# Offense count: 18
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: implicit, explicit
Style/RescueStandardError:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/definitions.rb'
- 'lib/fhir_dstu2_models/bootstrap/hashable.rb'
- 'lib/fhir_dstu2_models/bootstrap/json.rb'
- 'lib/fhir_dstu2_models/bootstrap/model.rb'
- 'lib/fhir_dstu2_models/bootstrap/xml.rb'
- 'lib/fhir_dstu2_models/fhir.rb'
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition_finding.rb'
- 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'
- 'lib/fhir_dstu2_models/fluentpath/expression.rb'
- 'lib/fhir_dstu2_models/fluentpath/parse.rb'

# Offense count: 4
# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: ConvertCodeThatCanStartToReturnNil, AllowedMethods.
# AllowedMethods: present?, blank?, presence, try, try!
Style/SafeNavigation:
# Configuration parameters: AllowModifier.
Style/SoleNestedConditional:
Exclude:
- 'lib/fhir_dstu2_models/bootstrap/definitions.rb'
- 'lib/fhir_dstu2_models/bootstrap/xml.rb'
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition.rb'
- 'lib/fhir_dstu2_models/fhir_ext/structure_definition_compare.rb'

# Offense count: 1
# Cop supports --auto-correct.
Expand All @@ -328,10 +230,3 @@ Style/WhileUntilModifier:
Exclude:
- 'lib/fhir_dstu2_models/fluentpath/evaluate.rb'

# Offense count: 624
# Cop supports --auto-correct.
# Configuration parameters: WordRegex.
# SupportedStyles: percent, brackets
Style/WordArray:
EnforcedStyle: percent
MinSize: 6402
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.4
3.1.2
Loading

0 comments on commit 29c3037

Please sign in to comment.