This gem is moving onto its own Semantic Versioning scheme starting with v1.0.0. All version bumps moving forward should increment using MAJOR.MINOR.PATCH
based on changes.
Prior to v1.0.0 this gem was versioned based on the MAJOR
.MINOR
version of RuboCop. The first release of the ezcater_rubocop gem was v0.49.0
.
- Update internal CI processes to validate Rubocop config files
- Fix a stray space in
Rails/BulkChangeTable
definition
- Disable
Rails/BulkChangeTable
to avoid conflicts withstrong_migrations
- Upgrade rubocop to v1 API (following guide here) to stop deprecation warnings in rubocop >=1.67.
- Drop support for ruby 2.6 & 3.0
- Disable
Naming/RescuedExceptionsVariableName
so exception variable names are less restrictive.
- Lock
rubocop-rspec
belowv2.28.0
to avoid an upstream namespacing issue.
- Add
Ezcater/GraphQL/NotAuthorizedScalarField
Cop which enforces the use of authorization for scalar GraphQL fields. Not enforced by default.
- Fix
FeatureFlagActive
cop so that it allows feature flag names to be constants and dot method calls in addition to strings.
- Upgrade rubocop-rspec to v2.22.0 to use the new FactoryBot namespaces.
- Fix the following wrong namespaces related to
FactoryBot
:RSpec/FactoryBot/AttributeDefinedStatically
,RSpec/FactoryBot/CreateList
andRSpec/FactoryBot/FactoryClassName
.
- Fix a bug in the
FeatureFlagNameValid
cop where the titlecase regex matcher was incorrectly finding offenses.
- Add
FeatureFlagNameValid
cop to validate correct feature flag name format, adopted from the cop inez-rails
.
- Fix the wrong namespace for
RSpec/Capybara/CurrentPathExpectation
andRSpec/Capybara/VisibilityMatcher
cops, since they've been extracted into a separate repo rubocop-capybara.
- Add an explicit rule for
Style/HashSyntax
, settingEnforcedShorthandSyntax: either
.
Ruby 3.1 introduces syntax where named arguments can be passed
name = "Michael"
method_with_named_args(name:)
rather than
name = "Michael"
method_with_named_args(name: name)
when the variable's name matches the named argument key.
For now, we have decided to allow either syntax while we upgrade our applications to Ruby 3.1. This is auto-correctable if and when we decide to enforce the new syntax.
- Change paths to exclude for various cops to be agnostic of directory structure prior to the matching string. This is to allow apps to have greater flexibility in where files live, but still have them excluded from certain cops. The need for this arose when implementing Stimpack, which moves specs and other files under app/packs/[pack_name].
- Enable all added cops since 0.8. There are a lot of new cops now, be sure to use
--regenerate-todo
if you're on a large project that can't be updated easily.
- Add the rubcop-graphql helpers and enable them by default
- Remove
Ezcater/GraphqlFieldsNaming
cop. The same rule exists inrubocop-graphql
.
- Loosen restrictions to allow for Ruby 3.1 and latest dependency gems
- Fix the RspecDotNotSelfDot cop to work with rubocop-rspec
- Exclude appraisal generated gemfiles for possible embedded gems in rails apps
- Upgrade rubocop: 1.16.0
- Upgrade rubocop-rails: 2.10.1
- Upgrade rubocop-rspec: 2.3.0
- This is a major upgrade because a large number of cops have been introduced, tweaked, or renamed. Here is an aggregate of the breaking changes introduced
- RuboCop assumes that Cop classes do not define new
on_<type>
methods at runtime (e.g. viaextend
ininitialize
). - Enable all pending cops for RuboCop 1.0.
- Change logic for cop department name computation. Cops inside deep namespaces (5 or more levels deep) now belong to departments with names that are calculated by joining module names starting from the third one with slashes as separators. For example, cop
Rubocop::Cop::Foo::Bar::Baz
now belongs toFoo/Bar
department (previously it wasBar
). RegexpNode#parsed_tree
now processes regexps including interpolation (by blanking the interpolation before parsing, rather than skipping).- Cop
Metrics/AbcSize
now counts ||=, &&=, multiple assignments, for, yield, iterating blocks.&.
now count as conditions too (unless repeated on the same variable). Default bumped from 15 to 17. Consider usingrubocop -a --disable-uncorrectable
to ease transition. - Cop
Metrics/PerceivedComplexity
now countselse
incase
statements,&.
,||=
,&&=
and blocks known to iterate. Default bumped from 7 to 8. Consider usingrubocop -a --disable-uncorrectable
to ease transition. - Extensive refactoring of internal classes
Team
,Commissioner
,Corrector
.Cop::Cop#corrections
not completely compatible. See Upgrade Notes. rubocop -a / --autocorrect
no longer run unsafe corrections;rubocop -A / --autocorrect-all
run both safe and unsafe corrections. Options--safe-autocorrect
is deprecated.- Order for gems names now disregards underscores and dashes unless
ConsiderPunctuation
setting is set totrue
. - Cop
Metrics/CyclomaticComplexity
now counts&.
,||=
,&&=
and blocks known to iterate. Default bumped from 6 to 7. Consider usingrubocop -a --disable-uncorrectable
to ease transition. - Remove support for unindent/active_support/powerpack from
Layout/HeredocIndentation
, so it only recommends using squiggy heredoc. - Change the max line length of
Layout/LineLength
to 120 by default. - Inspect all files given on command line unless
--only-recognized-file-types
is given. - Enabling a cop overrides disabling its department.
- Renamed
Layout/Tab
cop toLayout/IndentationStyle
. - Drop support for Ruby 2.3.
- Drop support for ruby 2.4.
- Retire
RSpec/InvalidPredicateMatcher
cop. - Enabled pending cop (
RSpec/StubbedMock
).
- RuboCop assumes that Cop classes do not define new
- Fix
FeatureFlagActive
cop so that it allows feature flag names to be variables in addition to strings. - Add check to
FeatureFlagActive
that the first parameter is a string or a variable, and use the appropriate messaging.
- Add
FeatureFlagActive
cop. This provides confidence that upgrading toezcater_feature_flag-client
v2.0.0, which contains breaking API changes, can be done safely.
- Require Ruby 2.6 or later.
- Set
TargetRubyVersion
to 2.6 inrubocop_gem
configuration.
- Enable
Rails/SaveBang
withAllowImplicitReturn: false
, and with autocorrection disabled.
- Update to
rubocop
v0.81.0,rubocop-rspec
v1.38.1 andrubocop-rails
v2.5.2. - This is being released as a major update because cops have been renamed so this is unlikely to be a drop-in replacement.
- This is the first release to support Ruby 2.7.
- Correct a matching syntax issue with
Ezcater/RubyTimeout
so that it applies in the expected cases.
- Add
Ezcater/RubyTimeout
cop.
- Add
Ezcater/GraphqlFieldsNaming
cop.
- Add
Ezcater/RailsTopLevelSqlExecute
to replaceActiveRecord::Base.connection.execute
withexecute
indb/migrate/
.
- Exclude
lib/tasks/
forEzcater/RailsEnv
andEzcater/DirectEnvCheck
.
- Add
Ezcater/RailsEnv
cop. - Add
Ezcater/DirectEnvCheck
cop.
- Exclude bootsnap cache directory (
tmp/cache
).
- Disable
Rails/HasAndBelongsToMany
cop. - Disable
Style/DoubleNegation
cop.
- Begin using Semantic Versioning
- Delete
Ezcater/PrivateAttr
Layout/IndentHash
enforces consistent styleLayout/IndentArray
enforces consistent style
- Update to
rubocop
v0.61.1. - Update to
rubocop-rspec
v1.30.1
- Disable
Style/NegatedIf
.
- Update
Metrics/BlockLength
to excludeapp/graphql/**/*.rb
- Move
Metrics/BlockLength
exclusions forlib/tasks/**/*.rake
andconfig/environments/*.rb
into rubocop_rails.yml
- Updated
Layout/MultilineMethodCallIndentation
toindented
.
- Updated
Ezcater/RspecDotNotSelfDot
to flag offenses for::class_method
.
- Update to
rubocop-rspec
v1.28.0. - Remove configuration for removed
FactoryBot/DynamicAttributeDefinedStatically
cop.
- Update to rubocop v0.58.1.
- Enable
Naming/MemoizedInstanceVariableName
with required leading underscore.
- Configure
Rspec/MessageExpectation
with theallow
style.
- Do not use broken parser v2.5.1.1.
- Fix
Ezcater/RspecRequireHttpStatusMatcher
cop.
- Add
Ezcater/RspecRequireHttpStatusMatcher
cop. - Enable
Rails/HttpStatus
cop and enforce symbols.
- Update to rubocop v0.57.2 and rubocop-rspec v1.27.0.
- Disable new cop
Naming/MemoizedInstanceVariableName
until configuration options are available. - Disable
FactoryBot/DynamicAttributeDefinedStatically
due to rubocop/rubocop-rspec#655. - Configure
Naming/UncommunicativeMethodParamName
to allowe, ex, id
param names. - Exclude appraisal generated gemfiles for gems.
- Add new configuration
rubocop_gem
for use with gems.
- Enable
Style/FrozenStringLiteralComment
with thewhen_needed
style.
- Configure
Style/TrailingCommaInLiteral
withconsistent_comma
style.
- Add
Ezcater/RspecMatchOrderedArray
cop. - Fix array equality matcher violations in specs.
- Configure
Style/RegexpLiteral
cop with theAllowInnerSlashes: true
option.
- Disable
Style/GuardClause
cop. - Exclude
spec/integrations
forRSpec/DescribeClass
.
- Disable
Style/IfUnlessModifier
cop.
- Allow staging as a rails environment for the Rails/UnknownEnv cop.
- Update to rubocop v0.52.1 and rubocop-rspec v1.22.2.
- Disable
RSpec/LetSetup
cop.
- Rename
Ezcater/RspecRequireGqlErrorHelpers
cop toEzcater/RequireGqlErrorHelpers
.
- Add
Ezcater/RailsConfiguration
cop. - Exclude
config/environments/*.rb
for theMetrics/BlockLength
cop.
- Add
Ezcater/RspecRequireGqlErrorHelpers
cop.
- Exclude
Gemfile
for theMetrics/LineLength
cop. - Add
system
to the excluded spec directories forRSpec/DescribeClass
.
- Configure
RSpec/DescribeClass
to exclude the spec directories which are excluded by explicit metadata. - Exclude
lib/tasks
for theMetrics/BlockLength
cop.
- Configure
Style/RaiseArgs
to use thecompact
style.
- Disable
Rails/FilePath
cop. - Disable
Style/EmptyLiteral
cop.
- Update to rubocop v0.51.0 and rubocop-rspec v1.20.0.
- Disable new cop
RSpec/ContextWording
. - Disable
Style/StderrPuts
forbin/yarn
.
- Configure
RSpec/NestedGroups
with aMax
value of 5.
- Configure
Style/PercentLiteralDelimiters
to prefer parentheses.
- Configure
RSpec/MultipleExpectations
with aMax
value of 5.
- Add
Ezcater/PrivateAttr
custom cop. - Configure
RSpec/ExampleLength
with aMax
value of 25. - Add
circle_rubocop.rb
script.
- Add shared configuration.
- Do not apply
Ezcater/StyleDig
to access using a range.
- Update to rubocop v0.50.0 and rubocop-rspec v1.18.0.
- Do not apply
Ezcater/StyleDig
to assignments with nested access.
- Do not apply
Ezcater/StyleDig
to access using a range.
- Do not apply
Ezcater/StyleDig
to assignments to with nested access.
- Add
Ezcater/RspecRequireBrowserMock
cop.
- Initial release.
- Add
Ezcater/RspecRequireFeatureFlagMock
cop. - Add
Ezcater/RspecDotNotSelfDot
cop. - Add
Ezcater/StyleDig
cop.