.rubocop.yml in alba-2.3.0 vs .rubocop.yml in alba-2.4.0
- old
+ new
@@ -1,9 +1,9 @@
---
inherit_gem:
- rubocop-sensible: 'config/rubocop.yml'
+ rubocop-gem_dev: 'config/rubocop.yml'
inherit_mode:
merge:
- Exclude
@@ -16,10 +16,11 @@
AllCops:
Exclude:
- 'Rakefile'
- 'alba.gemspec'
- 'benchmark/**/*.rb'
+ - 'docs/**/*'
- 'script/**/*.rb'
NewCops: enable
EnabledByDefault: true
TargetRubyVersion: 2.7
@@ -30,10 +31,14 @@
# Test class is a class, but not really
Layout/ClassStructure:
Exclude:
- 'test/**/*'
+# LineLength 80 comes from restrictions in good old days.
+Layout/LineLength:
+ Max: 160
+
# We'd like to write something like:
# assert_equal(
# expected,
# actual
# )
@@ -71,10 +76,15 @@
# Putting extra empty line is not valuable in test
# We prefer shorter test code
Minitest/EmptyLineBeforeAssertionMethods:
Enabled: false
+# By nature of that test
+Minitest/NoTestCases:
+ Exclude:
+ - 'test/dependencies/test_dependencies.rb'
+
# We need to eval resource code to test errors on resource classes
Security/Eval:
Exclude:
- 'test/**/*.rb'
@@ -107,10 +117,10 @@
Style/InlineComment:
Enabled: false
Style/MethodCallWithArgsParentheses:
- AllowedMethods: ['require', 'require_relative', 'include', 'extend', 'puts', 'p', 'warn', 'raise', 'send', 'public_send']
+ AllowedMethods: ['require', 'require_relative', 'include', 'extend', 'puts', 'p', 'warn', 'raise', 'send', 'public_send', 'alias_method']
Exclude:
# There are so many `attributes` call without parenthese and that's absolutely fine
- 'test/**/*.rb'
# There are so many cases we just want `if` expression!