Skip to content

Commit

Permalink
Merge pull request #214 from ifad/chore/add-rubocop-to-production-code
Browse files Browse the repository at this point in the history
Add RuboCop to production code - Stage I
  • Loading branch information
tagliala authored Sep 9, 2023
2 parents d3ac229 + 910eae8 commit b927ceb
Show file tree
Hide file tree
Showing 25 changed files with 815 additions and 501 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.rubocop_todo.yml linguist-generated
19 changes: 15 additions & 4 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-packaging
- rubocop-performance
Expand All @@ -11,17 +13,14 @@ AllCops:
TargetRubyVersion: 2.2
Exclude:
- 'gemfiles/**/*'
- 'lib/**/*'
- 'vendor/bundle/**/*'
- 'tmp/**/*'

Gemspec/DevelopmentDependencies:
Enabled: false

Layout/LineLength:
Max: 140
Exclude:
- 'spec/**/*'
Enabled: false

Lint/MissingSuper:
Exclude:
Expand All @@ -40,6 +39,15 @@ Metrics/MethodLength:
Exclude:
- 'spec/**/*'

Naming/MethodName:
AllowedPatterns:
- '_INSERT_'
- '_UPDATE_'
- '_DELETE_'

Naming/PredicateName:
Enabled: false

Rails/ApplicationRecord:
Enabled: false

Expand Down Expand Up @@ -75,6 +83,9 @@ Style/GlobalVars:
Exclude:
- 'spec/**/*'

Style/IfUnlessModifier:
Enabled: false

# NOTE: This cop is enabled by RuboCop Rails, because active support adds this
# method to hash, but `except` is not available in specs
Style/HashExcept:
Expand Down
341 changes: 341 additions & 0 deletions .rubocop_todo.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b927ceb

Please sign in to comment.