.rubocop.yml in alba-2.4.3 vs .rubocop.yml in alba-3.0.0

- old
+ new

@@ -20,11 +20,11 @@ - 'benchmark/**/*.rb' - 'docs/**/*' - 'script/**/*.rb' NewCops: enable EnabledByDefault: true - TargetRubyVersion: 2.7 + TargetRubyVersion: 3.0 # Items in Gemfile is dev dependencies and we don't have to specify versions. Bundler/GemVersion: Enabled: false @@ -60,10 +60,16 @@ Exclude: - 'test/**/*.rb' # `Resource` module is a core module and its length tends to be long... # `Alba` main module is also long because it has all parts of configuration +Metrics/ClassLength: + Exclude: + - 'lib/alba/resource.rb' + - 'lib/alba.rb' + - 'test/**/*.rb' # Neec to specify this + Metrics/ModuleLength: Exclude: - 'lib/alba/resource.rb' - 'lib/alba.rb' @@ -91,43 +97,51 @@ Style/ConstantVisibility: Exclude: - 'lib/alba/version.rb' - 'test/**/*.rb' +# Copyright is in README Style/Copyright: Enabled: false # I know what I do :) Style/DisableCopsWithinSourceCodeDirective: Enabled: false +# Test files doesn't need to have documentation Style/Documentation: Exclude: - 'test/**/*' +# In README it's so obvious Style/DocumentationMethod: Exclude: - 'README.md' +# This might be true in the future, but not many good things Style/FrozenStringLiteralComment: Enabled: false +# I don't want to think about error class in example code Style/ImplicitRuntimeError: Exclude: - 'README.md' +# We use it, don't we? Style/InlineComment: Enabled: false Style/MethodCallWithArgsParentheses: 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 + # There are so many calls like `attributes` and `register_type` without parenthese and that's absolutely fine - 'test/**/*.rb' + - 'README.md' # There are so many cases we just want `if` expression! Style/MissingElse: EnforcedStyle: case +# It's example code, please forgive us Style/OptionalBooleanParameter: Exclude: - 'README.md'