.rubocop.yml in alba-1.3.0 vs .rubocop.yml in alba-1.4.0
- old
+ new
@@ -11,16 +11,17 @@
AllCops:
Exclude:
- 'Rakefile'
- 'alba.gemspec'
- 'benchmark/**/*.rb'
+ - 'script/**/*.rb'
NewCops: enable
EnabledByDefault: true
TargetRubyVersion: 2.5
-# Oneline comment is not valid so until it gets valid, we disable it
-Bundler/GemComment:
+# Items in Gemfile is dev dependencies and we don't have to specify versions.
+Bundler/GemVersion:
Enabled: false
# We'd like to write something like:
# assert_equal(
# expected,
@@ -42,22 +43,18 @@
# In test code we don't care about the metrics!
Metrics:
Exclude:
- 'test/**/*.rb'
-Metrics/MethodLength:
- Max: 15
-
# `Resource` module is a core module and its length tends to be long...
Metrics/ModuleLength:
Exclude:
- 'lib/alba/resource.rb'
# Resource class includes DSLs, which tend to accept long list of parameters
Metrics/ParameterLists:
Exclude:
- - 'lib/alba/resource.rb'
- 'test/**/*.rb'
# We need to eval resource code to test errors on resource classes
Security/Eval:
Exclude:
@@ -79,10 +76,13 @@
Style/InlineComment:
Enabled: false
Style/MethodCallWithArgsParentheses:
- Enabled: false
+ IgnoredMethods: ['require', 'require_relative', 'include', 'extend', 'puts', 'p', 'warn', 'raise', 'send', 'public_send']
+ 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!
Style/MissingElse:
EnforcedStyle: case