Files
ubicloud/.rubocop.yml
Enes Cakir 5e31c2bc59 Update rubocop-rspec to v3
rubocop-rspec had a major upgrade from v2 to v3, necessitating some
modifications to our .rubocop.yml file.

- The `RSpec/FilePath` cop has been split into
  `RSpec/SpecFilePathFormat` and `RSpec/SpecFilePathSuffix`. We have
  already `RSpec/SpecFilePathFormat` cop enabled, but we had to disable
  `RSpec/FilePath` manually. But it's removed in the new version, so we
  don't need to disable it anymore.
- `RSpec/FactoryBot` and `RSpec/Rails` cops are extracted to separate
  gems. So we don't need to disable `RSpecRails/HaveHttpStatus` manually
  anymore which introduced at 68e40f32be.
2024-06-25 10:02:58 +03:00

77 lines
1.1 KiB
YAML

# Modified from https://www.fastruby.io/blog/ruby/code-quality/how-we-use-rubocop-and-standardrb.html
require:
- rubocop-capybara
- rubocop-erb
- rubocop-performance
- rubocop-rake
- rubocop-rspec
- rubocop-sequel
- standard
inherit_gem:
standard: config/base.yml
AllCops:
TargetRubyVersion: 3.2
NewCops: enable
Exclude:
- public/**/*
- vendor/**/*
- node_modules/**/*
RSpec:
Enabled: true
Performance:
Enabled: true
Rake:
Enabled: true
Sequel:
Enabled: true
RSpec/DescribeMethod:
Enabled: false
Style/FrozenStringLiteralComment:
Enabled: true
Layout/HeredocIndentation:
Enabled: false
Layout/SpaceInsideHashLiteralBraces:
Exclude:
- 'views/**/*.erb'
RSpec/ExampleLength:
Enabled: false
RSpec/MultipleExpectations:
Enabled: false
RSpec/StubbedMock:
Enabled: false
RSpec/MessageSpies:
Enabled: false
RSpec/SubjectStub:
Enabled: false
RSpec/ExpectInHook:
Enabled: false
RSpec/InstanceVariable:
Enabled: false
RSpec/SpecFilePathFormat:
Exclude:
- 'spec/routes/**/*.rb'
Sequel/ColumnDefault:
Enabled: false
Capybara/ClickLinkOrButtonStyle:
EnforcedStyle: strict