.rubocop.yml
require:
- rubocop-performance
- rubocop-rspec
inherit_gem:
rentacop:
- rentacop.yml
- rspec.yml
AllCops:
TargetRubyVersion: 3.1
Exclude:
- dev/**/*
# The `ConfigValidator` class is a DSL, let it be
Metrics/AbcSize: { Exclude: [lib/bashly/config_validator.rb] }
Metrics/CyclomaticComplexity: { Exclude: [lib/bashly/config_validator.rb] }
Metrics/PerceivedComplexity: { Exclude: [lib/bashly/config_validator.rb] }
Metrics/MethodLength: { Exclude: [lib/bashly/config_validator.rb] }
Style/GuardClause: { Exclude: [lib/bashly/config_validator.rb] }
# False positive report of invalid use of a method that starts with `set_`
Naming/AccessorMethodName:
Exclude:
- 'lib/bashly/concerns/indentation_helper.rb'
# FIXME: The `Command` class is too long
Metrics/ClassLength: { Exclude: [lib/bashly/script/command.rb] }
# Allow irregular filenames in some cases
RSpec/FilePath:
Exclude:
- 'spec/bashly/concerns/completions_command_spec.rb'
- 'spec/bashly/concerns/completions_flag_spec.rb'
RSpec/SpecFilePathFormat:
Exclude:
- 'spec/bashly/concerns/completions_command_spec.rb'
- 'spec/bashly/concerns/completions_flag_spec.rb'
# Allow longer integration examples as they are more complex by nature
RSpec/ExampleLength:
Exclude:
- 'spec/bashly/integration/**/*'
- 'spec/bashly/libraries/render*'