Skip to content
Snippets Groups Projects
Commit dcbecd0b authored by Darius Schneider's avatar Darius Schneider
Browse files

remove subconfig exception rules

parent 730ddf7e
Branches
No related tags found
No related merge requests found
# global default for everything, Rails apps, gems and scripts
plugins: plugins:
- rubocop-minitest - rubocop-minitest
- rubocop-performance - rubocop-performance
...@@ -52,13 +53,13 @@ Metrics/AbcSize: ...@@ -52,13 +53,13 @@ Metrics/AbcSize:
Metrics/BlockLength: Metrics/BlockLength:
AllowedMethods: ['class_eval', 'module_eval', 'refine'] # default: 'refine' AllowedMethods: ['class_eval', 'module_eval', 'refine'] # default: 'refine'
CountAsOne: &array_hash_heredoc_method_call ['array', 'hash', 'heredoc', 'method_call'] # default: [] CountAsOne: &array_hash_heredoc_method_call ['array', 'hash', 'heredoc', 'method_call'] # default: []
Exclude: &test_config_db_gemspec_subconfig ['test/**/*', 'config/**/*', 'db/**/*', '*.gemspec', '**/*/*config.rb'] Exclude: &test_config_db_gemspec ['test/**/*', 'config/**/*', 'db/**/*', '*.gemspec']
# default is too restrictive, having some restriction incentivizes to split up overly large classes # default is too restrictive, having some restriction incentivizes to split up overly large classes
Metrics/ClassLength: Metrics/ClassLength:
CountAsOne: *array_hash_heredoc_method_call # default: [] CountAsOne: *array_hash_heredoc_method_call # default: []
Max: 300 # default: 100 Max: 300 # default: 100
Exclude: *test_config_db_gemspec_subconfig Exclude: *test_config_db_gemspec
# default is too restrictive, allow higher complexity # default is too restrictive, allow higher complexity
Metrics/CyclomaticComplexity: Metrics/CyclomaticComplexity:
...@@ -68,13 +69,13 @@ Metrics/CyclomaticComplexity: ...@@ -68,13 +69,13 @@ Metrics/CyclomaticComplexity:
Metrics/MethodLength: Metrics/MethodLength:
CountAsOne: *array_hash_heredoc_method_call # default: [] CountAsOne: *array_hash_heredoc_method_call # default: []
Max: 30 # default: 10 Max: 30 # default: 10
Exclude: *test_config_db_gemspec_subconfig Exclude: *test_config_db_gemspec
# default is too restrictive, allow longer modules # default is too restrictive, allow longer modules
Metrics/ModuleLength: Metrics/ModuleLength:
CountAsOne: *array_hash_heredoc_method_call # default: [] CountAsOne: *array_hash_heredoc_method_call # default: []
Max: 300 # default: 100 Max: 300 # default: 100
Exclude: *test_config_db_gemspec_subconfig Exclude: *test_config_db_gemspec
# long parameter lists add too much complexity, keyword args are named and thus more obvious what is expected, ignore them # long parameter lists add too much complexity, keyword args are named and thus more obvious what is expected, ignore them
Metrics/ParameterLists: Metrics/ParameterLists:
...@@ -116,7 +117,7 @@ Rails/HasAndBelongsToMany: ...@@ -116,7 +117,7 @@ Rails/HasAndBelongsToMany:
# prevent puts, but exclude test, config, db since Rails Logger may not have been loaded # prevent puts, but exclude test, config, db since Rails Logger may not have been loaded
Rails/Output: Rails/Output:
Exclude: *test_config_db_gemspec_subconfig Exclude: *test_config_db_gemspec
# allow usage of methods that skip validations; we trust developers know what they are doing # allow usage of methods that skip validations; we trust developers know what they are doing
Rails/SkipsModelValidations: Rails/SkipsModelValidations:
...@@ -139,11 +140,11 @@ Style/DisableCopsWithinSourceCodeDirective: ...@@ -139,11 +140,11 @@ Style/DisableCopsWithinSourceCodeDirective:
# documentation of classes in migrations and tests is not needed # documentation of classes in migrations and tests is not needed
Style/Documentation: Style/Documentation:
Exclude: *test_config_db_gemspec_subconfig Exclude: *test_config_db_gemspec
# allow in auto-generated files # allow in auto-generated files
Style/GlobalStdStream: Style/GlobalStdStream:
Exclude: *test_config_db_gemspec_subconfig Exclude: *test_config_db_gemspec
# allow empty parentheses to differentiate method calls vs attributes # allow empty parentheses to differentiate method calls vs attributes
Style/MethodCallWithoutArgsParentheses: Style/MethodCallWithoutArgsParentheses:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment