DEV: update rubocop rules
This commit is contained in:
parent
36bf06f623
commit
1480c88529
|
@ -1,13 +1,16 @@
|
|||
require:
|
||||
- rubocop-discourse
|
||||
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.4
|
||||
DisabledByDefault: true
|
||||
Exclude:
|
||||
- 'db/schema.rb'
|
||||
- 'bundle/**/*'
|
||||
- 'vendor/**/*'
|
||||
- 'node_modules/**/*'
|
||||
- 'public/**/*'
|
||||
- 'plugins/**/gems/**/*'
|
||||
- "db/schema.rb"
|
||||
- "bundle/**/*"
|
||||
- "vendor/**/*"
|
||||
- "node_modules/**/*"
|
||||
- "public/**/*"
|
||||
- "plugins/**/gems/**/*"
|
||||
|
||||
# Prefer &&/|| over and/or.
|
||||
Style/AndOr:
|
||||
|
@ -57,7 +60,7 @@ Layout/SpaceAroundOperators:
|
|||
Enabled: true
|
||||
|
||||
Layout/SpaceBeforeFirstArg:
|
||||
Enabled: true
|
||||
Enabled: true
|
||||
|
||||
# Defining a method with parameters needs parentheses.
|
||||
Style/MethodDefParentheses:
|
||||
|
@ -83,7 +86,7 @@ Layout/Tab:
|
|||
Enabled: true
|
||||
|
||||
# Blank lines should not have any spaces.
|
||||
Layout/TrailingBlankLines:
|
||||
Layout/TrailingEmptyLines:
|
||||
Enabled: true
|
||||
|
||||
# No trailing whitespace.
|
||||
|
@ -113,7 +116,7 @@ Layout/MultilineMethodCallIndentation:
|
|||
Enabled: true
|
||||
EnforcedStyle: indented
|
||||
|
||||
Layout/AlignHash:
|
||||
Layout/HashAlignment:
|
||||
Enabled: true
|
||||
|
||||
Bundler/OrderedGems:
|
||||
|
@ -125,3 +128,24 @@ Style/SingleLineMethods:
|
|||
Style/Semicolon:
|
||||
Enabled: true
|
||||
AllowAsExpressionSeparator: true
|
||||
|
||||
Style/RedundantReturn:
|
||||
Enabled: true
|
||||
|
||||
DiscourseCops/NoChdir:
|
||||
Enabled: true
|
||||
Exclude:
|
||||
- 'spec/**/*' # Specs are run sequentially, so chdir can be used
|
||||
- 'plugins/*/spec/**/*'
|
||||
|
||||
DiscourseCops/NoURIEscapeEncode:
|
||||
Enabled: true
|
||||
|
||||
Style/GlobalVars:
|
||||
Enabled: true
|
||||
Severity: warning
|
||||
Exclude:
|
||||
- 'lib/tasks/**/*'
|
||||
- 'script/**/*'
|
||||
- 'spec/**/*.rb'
|
||||
- 'plugins/*/spec/**/*'
|
||||
|
|
Loading…
Reference in New Issue