Files
ubicloud/.rubocop.yml
Enes Cakir df3c8f011e Update rubocop and apply fixes
The new version fails with the following exception

    Error: The `Sequel/ColumnDefault` cop has been removed since ColumnDefault cop since it's mostly outdated advice. Details [#33](https://github.com/rubocop/rubocop-sequel/issues/32).
    (obsolete configuration found in .rubocop.yml, please update it)
    RuboCop failed!
    Running RuboCop...

Check the author of the linked issue [^1] (spoiler alert: @fdr)

Also I disabled new `Sequel/IrreversibleMigration` cop since we don't
try to make our migrations reversible [^2].

[^1]: https://github.com/rubocop/rubocop-sequel/issues/32
[^2]: https://github.com/ubicloud/ubicloud/pull/239
2024-10-28 22:01:50 -07: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/IrreversibleMigration:
Enabled: false
Capybara/ClickLinkOrButtonStyle:
EnforcedStyle: strict