Skip to content

Commit

Permalink
chore(rubocop): Add rubocop todo file to temporarily suppress all "fa…
Browse files Browse the repository at this point in the history
…ilures"

See #11
  • Loading branch information
ribose-jeffreylau committed Jul 10, 2024
1 parent 18d4d26 commit c37bc61
Show file tree
Hide file tree
Showing 4 changed files with 215 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.rubocop-https---*

/.bundle/
/.yardoc
/_yardoc/
Expand Down
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
inherit_from:
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
- .rubocop_todo.yml

# local repo-specific modifications
# ...
#
require:
- rubocop-performance
- rubocop-rails
- rubocop-rake
- rubocop-rspec

AllCops:
TargetRubyVersion: 3.0
Expand Down
200 changes: 200 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2024-07-10 12:03:55 UTC using RuboCop version 1.65.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: 9
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Max, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Layout/LineLength:
Exclude:
- 'lib/lutaml/model/serialize.rb'
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'

# Offense count: 1
# Configuration parameters: AllowComments.
Lint/EmptyClass:
Exclude:
- 'lib/lutaml/model/type.rb'

# Offense count: 3
# Configuration parameters: AllowedParentClasses.
Lint/MissingSuper:
Exclude:
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'
- 'lib/lutaml/model/xml_adapter/oga_adapter.rb'
- 'lib/lutaml/model/xml_adapter/ox_adapter.rb'

# Offense count: 6
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes, Max.
Metrics/AbcSize:
Exclude:
- 'lib/lutaml/model/type.rb'
- 'lib/lutaml/model/xml_adapter.rb'
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'

# Offense count: 2
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
# AllowedMethods: refine
Metrics/BlockLength:
Max: 36

# Offense count: 6
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
Metrics/CyclomaticComplexity:
Exclude:
- 'lib/lutaml/model/type.rb'
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'
- 'lib/lutaml/model/xml_adapter/ox_adapter.rb'

# Offense count: 8
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 43

# Offense count: 4
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
Metrics/ParameterLists:
Max: 7

# Offense count: 6
# Configuration parameters: AllowedMethods, AllowedPatterns, Max.
Metrics/PerceivedComplexity:
Exclude:
- 'lib/lutaml/model/type.rb'
- 'lib/lutaml/model/xml_adapter/nokogiri_adapter.rb'
- 'lib/lutaml/model/xml_adapter/ox_adapter.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Performance/MapCompact:
Exclude:
- 'lib/lutaml/model/type.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
RSpec/BeEq:
Exclude:
- 'spec/lutaml/model/collection_spec.rb'
- 'spec/lutaml/model/simple_model_spec.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: be, be_nil
RSpec/BeNil:
Exclude:
- 'spec/lutaml/model_spec.rb'

# Offense count: 6
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
- 'spec/lutaml/model/xml_adapter/nokogiri_adapter_spec.rb'
- 'spec/lutaml/model/xml_adapter/oga_adapter_spec.rb'
- 'spec/lutaml/model/xml_adapter/ox_adapter_spec.rb'

# Offense count: 18
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
# SupportedStyles: described_class, explicit
RSpec/DescribedClass:
Exclude:
- 'spec/address_spec.rb'
- 'spec/lutaml/model/custom_serialization_spec.rb'
- 'spec/lutaml/model/defaults_spec.rb'
- 'spec/lutaml/model/render_nil_spec.rb'
- 'spec/person_spec.rb'

# Offense count: 55
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 36

# Offense count: 2
# Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
RSpec/IndexedLet:
Exclude:
- 'spec/address_spec.rb'

# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AutoCorrect.
RSpec/LetBeforeExamples:
Exclude:
- 'spec/lutaml/model/defaults_spec.rb'
- 'spec/person_spec.rb'

# Offense count: 3
RSpec/MultipleDescribes:
Exclude:
- 'spec/lutaml/model/json_adapter_spec.rb'
- 'spec/lutaml/model/toml_adapter_spec.rb'
- 'spec/lutaml/model/xml_adapter_spec.rb'

# Offense count: 53
RSpec/MultipleExpectations:
Max: 15

# Offense count: 1
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 9

# Offense count: 2
RSpec/PendingWithoutReason:
Exclude:
- 'spec/lutaml/model/xml_adapter/oga_adapter_spec.rb'
- 'spec/lutaml/model/xml_adapter_spec.rb'

# Offense count: 3
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AutoCorrect.
RSpec/ScatteredLet:
Exclude:
- 'spec/lutaml/model/defaults_spec.rb'
- 'spec/person_spec.rb'

# Offense count: 5
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
# Include: **/*_spec.rb
RSpec/SpecFilePathFormat:
Exclude:
- 'spec/lutaml/model/collection_spec.rb'
- 'spec/lutaml/model/xml_adapter/nokogiri_adapter_spec.rb'
- 'spec/lutaml/model/xml_adapter/oga_adapter_spec.rb'
- 'spec/lutaml/model/xml_adapter/ox_adapter_spec.rb'
- 'spec/lutaml/model/yaml_adapter_spec.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
Rails/NegateInclude:
Exclude:
- 'lib/lutaml/model/serialize.rb'

# Offense count: 1
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: NotNilAndNotEmpty, NotBlank, UnlessBlank.
Rails/Present:
Exclude:
- 'lib/lutaml/model/xml_namespace.rb'

# Offense count: 6
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: strict, flexible
Rails/TimeZone:
Exclude:
- 'lib/lutaml/model/type.rb'
- 'lib/lutaml/model/type/time_without_date.rb'
- 'spec/person_spec.rb'

# Offense count: 1
Style/DocumentDynamicEvalDefinition:
Exclude:
- 'lib/lutaml/model/type.rb'
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,13 @@ gem "ox"

gem "pry"

gem "rubocop-performance"
gem "rubocop-performance", require: false

gem "rubocop-rails"
gem "rubocop-rails", require: false

gem "rubocop-rake", require: false

gem "rubocop-rspec", require: false

gem "tomlib"

Expand Down

0 comments on commit c37bc61

Please sign in to comment.