mirror of
https://github.com/internetee/registry.git
synced 2025-06-30 16:23:38 +02:00
Improve Rubocop inspections
- Use default config - Make offences snapshot The latter suppresses current offences while reports new ones #579
This commit is contained in:
parent
e29768f04a
commit
a7ea80a934
2 changed files with 1288 additions and 124 deletions
125
.rubocop.yml
125
.rubocop.yml
|
@ -1,124 +1 @@
|
||||||
AllCops:
|
inherit_from: .rubocop_todo.yml
|
||||||
Exclude:
|
|
||||||
- 'Guardfile'
|
|
||||||
# stuff generated by AR and rails
|
|
||||||
- 'config/deploy-example.rb'
|
|
||||||
- 'config/environments/development-example.rb'
|
|
||||||
- 'config/environments/staging-example.rb'
|
|
||||||
- 'db/schema.rb'
|
|
||||||
- 'db/schema-read-only.rb'
|
|
||||||
- 'db/whois_schema.rb'
|
|
||||||
- 'db/api_log_schema.rb'
|
|
||||||
- 'db/migrate/*'
|
|
||||||
- 'db/data/*'
|
|
||||||
# epp support files until 'complexity issues' will be solved
|
|
||||||
- 'spec/support/epp.rb'
|
|
||||||
- 'spec/support/epp_contact_xml_builder.rb'
|
|
||||||
- 'vendor/bundle/**/*'
|
|
||||||
- 'lib/tasks/import.rake'
|
|
||||||
|
|
||||||
Metrics/LineLength:
|
|
||||||
Max: 120 # default 80
|
|
||||||
|
|
||||||
Metrics/MethodLength:
|
|
||||||
Max: 25 # default 10
|
|
||||||
|
|
||||||
Metrics/ClassLength:
|
|
||||||
Max: 300
|
|
||||||
|
|
||||||
Documentation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/Semicolon:
|
|
||||||
AllowAsExpressionSeparator: true
|
|
||||||
|
|
||||||
Style/AndOr:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/BracesAroundHashParameters:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/IndentHash:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# no need to worry about it
|
|
||||||
Style/StringLiterals:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# a bit too annoying requirement, no big drawback yet dedected
|
|
||||||
Style/TrailingWhitespace:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# a bit too annoying requirement, no big drawback yet dedected
|
|
||||||
Style/TrailingBlankLines:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# allow == operator used in void context in specs
|
|
||||||
Void:
|
|
||||||
Exclude:
|
|
||||||
- 'spec/**/*'
|
|
||||||
|
|
||||||
# allow should == nil in spec
|
|
||||||
Style/NilComparison:
|
|
||||||
Exclude:
|
|
||||||
- 'spec/**/*'
|
|
||||||
|
|
||||||
# let's save space in spec
|
|
||||||
Style/AlignHash:
|
|
||||||
Exclude:
|
|
||||||
- 'spec/**/*'
|
|
||||||
|
|
||||||
# No need to force reduce to use |a, e| as parameters.
|
|
||||||
# Configuration parameters: Methods.
|
|
||||||
Style/SingleLineBlockParams:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# allow prefix for models and controllers,
|
|
||||||
# otherwise we have to intent all body 4 spaces
|
|
||||||
Style/ClassAndModuleChildren:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Allow to use Estonian terms/data in comments
|
|
||||||
Style/AsciiComments:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# turn off comment intention check during development
|
|
||||||
# because NerdCommenter honors commented code intentions
|
|
||||||
Style/CommentIndentation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# It did not alayws suggested good format
|
|
||||||
Style/AlignParameters:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# No need fancy style of numbers such as 1_000_000
|
|
||||||
Style/NumericLiterals:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Too often suggest wrong syntax in subarray, this should be fix in rubocop first
|
|
||||||
Style/WordArray:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# Ok to use parallel assigment such as: var1, var2 = [], []
|
|
||||||
Style/ParallelAssignment:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# not working perfectly or not important enough to care
|
|
||||||
Style/EmptyLinesAroundBlockBody:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# The ABC size is a calculated magnitude, so this number can be a Fixnum or a Float.
|
|
||||||
Metrics/AbcSize:
|
|
||||||
Max: 35
|
|
||||||
|
|
||||||
# Very strange intention requirement, disabled for now
|
|
||||||
Style/FirstParameterIndentation:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# old school regex // works fine
|
|
||||||
Style/RegexpLiteral:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
# annoying to maintain, small thing, no real problem
|
|
||||||
Style/SpaceInsideHashLiteralBraces:
|
|
||||||
Enabled: false
|
|
||||||
|
|
1287
.rubocop_todo.yml
Normal file
1287
.rubocop_todo.yml
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue