All notable changes to this project will be documented in this file.
This project adheres to Semantic Versioning.
- Upgrade to
rubocop
1.70 (was 1.61) - Disable new cop
Style/CombinableDefined
- Add Support for Ruby 3.4
- Fix
rubocop
1.61 dependency to avoid upgrading to newer rubocop releases.
- Disable
Capybara/ClickLinkOrButtonStyle
(#49)
- Upgrade to
rubocop-rspec
3.0.3 (was 2.25.0) - Upgrade to
rubocop
1.61 (was 1.60)
- Upgrade to
rubocop-rspec
2.25.0 (was 2.13.2) - Disable nested cops introduced by dependencies (e.g. Rspec/Capybara). Since the config for the respective gem should be considered the single source of truth
- Add default configuration for
rubocop-capybara
andrubocop-factory_bot
- Supports Ruby 3.3 and Rails 7.1.
- Upgrade to
rubocop
1.60.0 (was 1.39.0) - Upgrade to
rubocop-rails
2.23.1 (was 2.19.0) - Drop support for Ruby 2.6 (following change from
rubocop
1.51.0)
- Enable
Lint/Debugger
(#42)
- Disable
RSpec/Capybara/SpecificFinders
(#41)
- Upgrade
rubocop-rails
from version2.17.2
to2.19.0
.
- Upgrade
rubocop
from version1.25.1
to1.39.0
. - Upgrade
rubocop-rails
from version2.11.3
to2.17.2
. - Upgrade
rubocop-rspec
from version2.4.0
to2.13.2
. - Drop Support for Ruby <
2.6
- Disable
Naming/BlockForwarding
(#37) - Change
Style/HashSyntax
fromEnforcedShorthandSyntax
always
toeither
(#36)
- Activate Rubygems MFA
- Changed
Rails/RequestReferer
fromEnforcedStyle
referer
toreferrer
- Upgrade rubocop from version
1.18.4
to1.25.1
(adds support for Ruby 3.1).
- Disable
Rails/LinkToBlank
- Disable
RSpec/ExpectChange
- Dropped support for Ruby <
2.5.0
. - Upgrade
rubocop
from version1.9.1
to1.18.4
. - Upgrade
rubocop-rails
from version2.9.1
to2.11.3
. - Upgrade
rubocop-rspec
from version2.2.0
to2.4.0
.
-
Use the format
simple
output, and notprogress
. -
Also output stdout if stderr is present. Otherwise warnings like whitequark/parser will block the actual offenses message to be skipped. Originally we thought the only stderr message will be a failure of rubocop itself, so there would be never a stdout, too.
Before:
1) rubocop has no offenses Failure/Error: example.run warning: parser/current is loading parser/ruby26, which recognizes warning: 2.6.7-compliant syntax, but you are running 2.6.5. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. # ./spec/support/with_power.rb:11:in `block (2 levels) in <top (required)>' # ./spec/support/vcr.rb:16:in `block (2 levels) in <top (required)>' # ./spec/support/database_cleaner.rb:21:in `block (2 levels) in <top (required)>'
After:
1) rubocop has no offenses Failure/Error: example.run warning: parser/current is loading parser/ruby26, which recognizes warning: 2.6.7-compliant syntax, but you are running 2.6.5. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. == app/user/search.rb == C: 5: 3: [Correctable] Layout/IndentationWidth: Use 2 (not 5) spaces for indentation. 1016 files inspected, 1 offense detected, 1 offense auto-correctable # ./spec/support/with_power.rb:11:in `block (2 levels) in <main>' # ./spec/support/vcr.rb:16:in `block (2 levels) in <main>' # ./spec/support/database_cleaner.rb:21:in `block (2 levels) in <main>'
- Disable
Style/AccessorGrouping
- Upgrade
rubocop
from version0.81.0
to1.9.1
- Re-enable
Layout/RescueEnsureAlignment
as the bug seems to be fixed in1.9.1
- Add most of the new cops from
1.9.1
- Re-enable
- Upgrade
rubocop-rails
from version2.5.1
to2.9.1
- Upgrade
rubocop-rspec
from version2.2.0
to1.40.0
- Disable
RSpec/SubjectStub
- Disable
RSpec/NamedSubject
- Disable
RSpec/LetSetup
-
Add rubocop-rspec
You can add it to a project like this:
inherit_gem: makandra-rubocop: - config/default.yml - config/ext/rspec.yml
-
Disable the
Style/ClassCheck
cop (#22)
- Upgrade
rubocop
- Upgrade
rubocop-rails
Migration notes:
In case you are using a project with Ruby < 2.5 you need to add these lines to your .rubocop.yml
:
Style/HashTransformKeys:
Enable: false # Disabled until Ruby 2.5 upgrade
Style/HashTransformValues:
Enable: false # Disabled until Ruby 2.5 upgrade
- Disable
Lint/EmptyWhen
(#18) - Disable
Naming/RescuedExceptionsVariableName
(#19)
- Temporary disable
Layout/RescueEnsureAlignment
again, rubocop/rubocop#6771 seems not to have fixed the issue in our 4.0.0 release.
- Disable
Rails/HelperInstanceVariable
- Disable
Rails/HasManyOrHasOneDependent
- Disable Rails/UnknownEnv cop
- Upgrade to Rubocop 0.76.0
- Drop support for Ruby < 2.3.0
Rubopcop 0.72.0 extracts all its Rails helpers to a new gem. This results in two split config files in the
makandra-rubocop
gem:
- config/default.yml (contains now only Ruby cops)
- config/ext/rails.yml (contains all Rails cops)
Enabling the Rails cops was and is optional in makandra-rubocop
. In case you want to use the Ruby cops only, please
use the following config as before:
inherit_gem:
makandra-rubocop:
- config/default.yml
In case you want to use the Ruby and the Rails cops:
1. Remove the following config (if present) from your .rubocop.yml
:
Rails:
Enabled: true
2. Change the beginning of your .rubocop.yml
:
inherit_gem:
makandra-rubocop:
- config/default.yml
- config/ext/rails.yml
- Use
Rspec.describe
instead ofdescribe
in the shared spec to support projects, that have the RSpec monkey patch disabled
- Update bundler to version 2 (only for development)
- Exclude files in
tmp
andpublic/system
.
- Disable
Layout/SpaceAfterColon
(#6) - Disable
Layout/RescueEnsureAlignment
(#7)
- Upgrade Rubocop from 0.62.0 to 0.65.0
- Disable
Style/MultilineBlockChain
forspec/**/*
- Disable
Layout/ClosingParenthesisIndentation
- We updated the Cop
Layout/SpaceInsideHashLiteralBraces
. Braces used for hash literals now should have surrounding space:Run# bad h = {a: 1, b: 2} # good h = { a: 1, b: 2 }
bundle exec rubocop --auto-correct
to upgrade your project.
- First release of our default rule set. See README on how to integrate with your project.
- Rubocop 0.62.0