diff --git a/rails/rubocop/rubocop-base.yml b/rails/rubocop/rubocop-base.yml index 371266acf864ccee23e16b1824b2b1712cdea2c6..3739035afb9b53d3f7fd1436b5727be1bfe4c5f6 100644 --- a/rails/rubocop/rubocop-base.yml +++ b/rails/rubocop/rubocop-base.yml @@ -1,3 +1,4 @@ +# global default for everything, Rails apps, gems and scripts plugins: - rubocop-minitest - rubocop-performance @@ -52,13 +53,13 @@ Metrics/AbcSize: Metrics/BlockLength: AllowedMethods: ['class_eval', 'module_eval', 'refine'] # default: 'refine' 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 Metrics/ClassLength: CountAsOne: *array_hash_heredoc_method_call # default: [] Max: 300 # default: 100 - Exclude: *test_config_db_gemspec_subconfig + Exclude: *test_config_db_gemspec # default is too restrictive, allow higher complexity Metrics/CyclomaticComplexity: @@ -68,13 +69,13 @@ Metrics/CyclomaticComplexity: Metrics/MethodLength: CountAsOne: *array_hash_heredoc_method_call # default: [] Max: 30 # default: 10 - Exclude: *test_config_db_gemspec_subconfig + Exclude: *test_config_db_gemspec # default is too restrictive, allow longer modules Metrics/ModuleLength: CountAsOne: *array_hash_heredoc_method_call # default: [] 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 Metrics/ParameterLists: @@ -116,7 +117,7 @@ Rails/HasAndBelongsToMany: # prevent puts, but exclude test, config, db since Rails Logger may not have been loaded 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 Rails/SkipsModelValidations: @@ -139,11 +140,11 @@ Style/DisableCopsWithinSourceCodeDirective: # documentation of classes in migrations and tests is not needed Style/Documentation: - Exclude: *test_config_db_gemspec_subconfig + Exclude: *test_config_db_gemspec # allow in auto-generated files Style/GlobalStdStream: - Exclude: *test_config_db_gemspec_subconfig + Exclude: *test_config_db_gemspec # allow empty parentheses to differentiate method calls vs attributes Style/MethodCallWithoutArgsParentheses: