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

update

parent 3613cd80
No related branches found
No related tags found
No related merge requests found
......@@ -5,11 +5,11 @@ inherit_from:
plugins:
- rubocop-packaging
# gem "rubocop", "1.75.3", require: false
# gem "rubocop", "1.75.7", require: false
# gem "rubocop-minitest", "0.38.0", require: false
# gem "rubocop-packaging", "0.6.0", require: false
# gem "rubocop-performance", "1.25.0", require: false
# gem "rubocop-rails", "2.31.0", require: false
# gem "rubocop-rails", "2.32.0", require: false
# BEGIN Customizations
# BEGIN Gemspec
......
......@@ -51,13 +51,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 ['test/**/*', 'config/**/*', 'db/**/*', '*.gemspec']
Exclude: &test_spec_config_db_gemspec ['test/**/*', 'spec/**/*', '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
Exclude: *test_spec_config_db_gemspec
# default is too restrictive, allow higher complexity
Metrics/CyclomaticComplexity:
......@@ -67,13 +67,13 @@ Metrics/CyclomaticComplexity:
Metrics/MethodLength:
CountAsOne: *array_hash_heredoc_method_call # default: []
Max: 30 # default: 10
Exclude: *test_config_db_gemspec
Exclude: *test_spec_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
Exclude: *test_spec_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:
......@@ -106,18 +106,19 @@ Minitest/MultipleAssertions:
# Rails/CreateTableWithTimestamps: audited does not include 'updated_at', may also be true for other libraries, ultimately leave the choice to end-user
# Rails/DangerousColumnNames: mainly to allow adding and changing column named 'id'
# Rails/NegateInclude: allow classes to define include? and not force to also define exclude?, like IPAddr
# Rails/RakeEnvironment: allow tasks to not depend on :environment task
# Rails/ThreeStateBooleanColumn: allow usage of three-state boolean columns, it may be an STI table
Style/DisableCopsWithinSourceCodeDirective:
Enabled: true
AllowedCops: ['ItcGemRubocop/DevelopmentHosts', 'ItcGemRubocop/NocPortalRz', 'Lint/UnusedMethodArgument', 'Naming/PredicateName', 'Naming/VariableNumber', 'Rails/CreateTableWithTimestamps', 'Rails/DangerousColumnNames', 'Rails/NegateInclude', 'Rails/ThreeStateBooleanColumn']
AllowedCops: ['ItcGemRubocop/DevelopmentHosts', 'ItcGemRubocop/NocPortalRz', 'Lint/UnusedMethodArgument', 'Naming/PredicateName', 'Naming/VariableNumber', 'Rails/CreateTableWithTimestamps', 'Rails/DangerousColumnNames', 'Rails/NegateInclude', 'Rails/RakeEnvironment', 'Rails/ThreeStateBooleanColumn']
# documentation of classes in migrations and tests is not needed
Style/Documentation:
Exclude: *test_config_db_gemspec
Exclude: *test_spec_config_db_gemspec
# allow in auto-generated files
Style/GlobalStdStream:
Exclude: *test_config_db_gemspec
Exclude: *test_spec_config_db_gemspec
# allow empty parentheses to differentiate method calls vs attributes
Style/MethodCallWithoutArgsParentheses:
......
......@@ -22,7 +22,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']
Exclude: ['test/**/*', 'spec/**/*', 'config/**/*', 'db/**/*', '*.gemspec']
# allow usage of methods that skip validations; we trust developers know what they are doing
Rails/SkipsModelValidations:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment