Skip to content

Commit

Permalink
Ignore schema on RuboCop
Browse files Browse the repository at this point in the history
Needs "--force-exclusion" to respect excluded files as per rubocop/rubocop#893
  • Loading branch information
Miha Rekar committed Nov 9, 2020
1 parent 8f76e8d commit e5a0a25
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 25 deletions.
21 changes: 12 additions & 9 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ require:

AllCops:
NewCops: enable
Exclude:
- 'db/schema.rb'

Layout/SpaceInsideHashLiteralBraces:
Enabled: true
Expand All @@ -19,33 +21,34 @@ Layout/DotPosition:
Enabled: true
EnforcedStyle: trailing

Style/RaiseArgs:
Metrics/BlockLength:
Enabled: false

Style/NumericLiterals:
Metrics/ClassLength:
Enabled: false

Style/Send:
Enabled: true
Metrics/MethodLength:
Enabled: false

Metrics/ClassLength:
Style/RaiseArgs:
Enabled: false

Metrics/MethodLength:
Style/NumericLiterals:
Enabled: false

Style/AndOr:
Style/Send:
Enabled: true
EnforcedStyle: always

Style/Send:
Style/AndOr:
Enabled: true
EnforcedStyle: always

Rails/DynamicFindBy:
Enabled: false

Rails/SquishedSQLHeredocs:
Enabled: false

# Let's discuss this one
# I'd like to go double quotes everywhere, but am open to discussion
# Style/StringLiterals:
Expand Down
15 changes: 0 additions & 15 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,6 @@ Layout/EmptyLinesAroundAccessModifier:
Exclude:
- 'app/policies/guild/post_policy.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: empty_lines, no_empty_lines
Layout/EmptyLinesAroundBlockBody:
Exclude:
- 'db/schema.rb'

# Offense count: 4
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand Down Expand Up @@ -276,13 +268,6 @@ Lint/UselessMethodDefinition:
Metrics/AbcSize:
Max: 79

# Offense count: 202
# Configuration parameters: CountComments, CountAsOne, ExcludedMethods.
# ExcludedMethods: refine
Metrics/BlockLength:
Max: 790


# Offense count: 4
# Configuration parameters: IgnoredMethods.
Metrics/CyclomaticComplexity:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@
"build-storybook": "build-storybook -c donut/.storybook"
},
"lint-staged": {
"*.rb": "bundle exec rubocop",
"*.rb": "bundle exec rubocop --force-exclusion",
"*.js": [
"eslint --cache --fix",
"prettier"
Expand Down

0 comments on commit e5a0a25

Please sign in to comment.