- Adjustment for supporting rubocop-rspec 3.0.0 >=
- Bringing out out capybara cop in its own file.
- This require 'rubocop-capybara' gem to be added to support the cop rules.
Example:
inherit_gem:
gc_ruboconfig:
- rubocop.yml
- rails.yml
- capybara.yml
- Drop support for Ruby 2.7
- Disable
Rails/WhereRange
- Adjust renamed cops
- Disable
RSpec/ExampleWording
- Disable
HashEachMethods
style for Style/HashEachMethods
- Enforce
always
style for Style/AndOr
- Set Style/ArgumentsForwarding -
UseAnonymousForwarding
to false.
- Increase line length from 90 to 120
- Drop support for Ruby 2.6
- Bump minimum rubocop version to 1.50.0
- Add Ruby 3.2 to test version matrix
- Fix
RSpec/FactoryBot
namespace warnings for rubocop-rspec >= 2.22.0- FactoryBot cops have now been moved out into a new
rubocop-factory_bot
gem
- FactoryBot cops have now been moved out into a new
- Bump rubocop-rspec minimum version to 2.22.0
This version introduces no changes. We've cut it to check that our release process works as expected.
Fix RSpec/Capybara
namespace warnings
Add cops from:
- rubocop 1.37.1
- rubocop-rspec 2.14.2
- rubocop-rails 2.17.2
Set RSpec/Rails/HttpStatus's enforced style to numeric
Enabled new cops from rubocop
1.36.0
, rubocop-rails
2.16.1
and rubocop-rspec
2.13.2
Update rubocop-rspec requirement to be >=2.13.1
Fixed the version for rubocop-rspec to be <=2.12.1
Removed Gemspec/DateAssignment
as it has been removed from rubocop. This is replaced by
Gemspec/DeprecatedAttributeAssignment
Enabled new cops from rubocop
1.29.1
and rubocop-rspec
2.11.0
Enabled new cops from rubocop
1.26.1
and rubocop-rails
2.14.0
Remove rubocop-rails
require from rubocop.yml
Allowing Rails based cops to be required separately. Add the following to use them:
inherit_gem:
gc_ruboconfig:
- rubocop.yml
- rails.yml
Adding rubocop-rails
as part of the default install
- Enabled all
Rails/
cops except:Rails/AddColumnIndex
- Allowindex: true
when creating a columnRails/ShortI18n
- Use long formtranslate
andlocalize
instead oft
andl
Adding support for new cops:
-
Enabled cops:
Performance/StringIdentifierArgument
- Only pass symbols tosend
Style/MapToHash
- Preferto_h {}
overmap {}.to_h
Style/NumberedParameters
- Only allow numbered params on single linesStyle/NumberedParametersLimit
- Cap number of numbered params at 2Security/IoMethods
- Disallow direct access toIO.read
methodsGemspec/RequireMFA
- Require MFA annotation on gemspecsLint/AmbiguousOperatorPrecedence
- Wrap arguments in parenthesis to denote operator preferenceLint/IncompatibleIoSelectWithFiberScheduler
-Lint/RequireRelativeSelfPath
- Don'trequire_relative
on selfLint/UselessRuby2Keywords
Naming/BlockForwarding
- Preferdef foo(&block)
overdef foo(&)
RSpec/ExcessiveDocstringSpacing
- Remove extra spaces in rspecdescribe/context/it
blocksRSpec/SubjectDeclaration
- Ensuresubject
is defined usingsubject {}
rather thanlet(:subject) {}
RSpec/Rails/AvoidSetupHook
- Don't usesetup {}
in testsPerformance/ConcurrentMonotonicTime
- Use correct monotonic time
-
Disabled cops:
Style/HashSyntax
- Don't permit shorthand hash assignmentfoo = 1; { foo: }
Style/FileRead
- Allow use ofFile.open(path, "r")
Style/FileWrite
- Allow use ofFile.open(path, "w")
Style/OpenStructUse
- Allow use ofOpenStruct
sStyle/SelectByRegexp
- Allowselect { _1 =~ /regex/ }
- Set sensible defaults for:
Metrics/AbcSize
Metrics/CyclomaticComplexity
Metrics/ParameterLists
- Disabled cop:
RSpec/FactoryBot/SyntaxMethods
- Disabled cop:
Metrics/MethodLength
- Enable support for new cops:
Layout/LineEndStringConcatenationIndentation
Naming/InclusiveLanguage
(disabled by default)Lint/AmbiguousRange
Style/RedundantSelfAssignmentBranch
RSpec/IdenticalEqualityAssertion
- Disabled a couple of cops:
- Style/NegatedIf
- Style/IfUnlessModifier
- Enabled new rubocop cops:
- Lint/EmptyInPattern
- Style/StringChars
- Style/InPatternThen
- Style/MultilineInPatternThen
- Style/QuotedSymbols
- Enabled new rubocop-performance cops:
- Performance/MapCompact
- Enabled new cops:
- Gemspec/DateAssignment
- Layout/SpaceBeforeBrackets
- Lint/AmbiguousAssignment
- Lint/DeprecatedConstants
- Lint/LambdaWithoutLiteralBlock
- Lint/NumberedParameterAssignment
- Lint/OrAssignmentToConstant
- Lint/RedundantDirGlobSort
- Lint/SymbolConversion
- Lint/TripleQuotes
- Style/EndlessMethod
- Style/HashConversion
- Style/HashExcept
- Style/IfWithBooleanLiteralBranches
- Performance/RedundantEqualityComparisonBlock
- Performance/RedundantSplitRegexpArgument
- Add missing Lint/EmptyClass
enabled
flag - Enabled new cops:
- Style/RedundantArgument
- Lint/UnexpectedBlockArity
- Disable Lint/EmptyClass for specs
- Enable support for new cops introduced by rubocop v1.1, v1.2 and v1.3:
- Lint/DuplicateBranch (disabled by default)
- Lint/EmptyBlock (disabled by default)
- Lint/NoReturnInBeginEndBlocks (disabled by default)
- Style/CommentAnnotation (disabled by default)
- Style/DocumentDynamicEvalDefinition (disabled by default)
- Style/NegatedIfElseCondition (disabled by default)
- Lint/DuplicateRegexpCharacterClassElement
- Lint/ToEnumArguments
- Lint/UnmodifiedReduceAccumulator
- Style/ArgumentsForwarding
- Style/CollectionCompact
- Style/NilLambda
- Style/SwapValues
- Enable support for new cops introduced by rubocop-performance 1.9:
- Performance/ArraySemiInfiniteRangeSlice (disabled by default)
- Performance/BlockGivenWithExplicitBlock
- Performance/CollectionLiteralInLoop
- Performance/ConstantRegexp
- Performance/MethodObjectAsBlock
- Disabled
Lint/ConstantDefinitionInBlock
by default - Require rubocop 1.0
- Enable support for new cops introduced by rubocop v0.91, v0.92 and v0.93, rubocop-rspec 1.44 and rubocop-performance 1.8:
RSpec/StubbedMock
(disabled by default)Performance/Sum
Lint/ConstantDefinitionInBlock
Lint/HashCompareByIdentity
Lint/IdentityComparison
Lint/RedundantSafeNavigation
Lint/UselessTimes
Style/ClassEqualityComparison
Layout/BeginEndAlignment
- Enable support for new cops introduced by rubocop v0.90:
Lint/DuplicateRequire
Lint/EmptyFile
Lint/TrailingCommaInAttributeDeclaration
Lint/UselessMethodDefinition
Style/CombinableLoops
Style/KeywordParametersOrder
Style/RedundantSelfAssignment
Style/SoleNestedConditional
(disabled by default)
- Set a larger default for
RSpec/MultipleMemoizedHelpers
- Enable new cops introduced by rubocop v0.89:
Lint/BinaryOperatorWithIdenticalOperands
Lint/DuplicateRescueException
Lint/EmptyConditionalBody
Lint/FloatComparison
Lint/MissingSuper
Lint/OutOfRangeRegexpRef
Lint/SelfAssignment
Lint/TopLevelReturnWithArgument
Lint/UnreachableLoop
Style/ExplicitBlockArgument
Style/GlobalStdStream
Style/SingleArgumentDig
Style/OptionalBooleanParameter
Style/StringConcatenation
- Enable new cops introduced by rubocop v0.88:
Lint/DuplicateElsifCondition
Style/ArrayCoercion
Style/CaseLikeIf
Style/HashLikeCase
Style/RedundantFileExtensionInRequire
- Enable new cops introduced by rubocop-performance v1.7:
Performance/AncestorsInclude
Performance/BigDecimalWithNumericArgument
Performance/RedundantSortBlock
Performance/ReverseFirst
Performance/SortReverse
Performance/Squeeze
Performance/StringInclude
- Support new cop introduced by rubocop v0.87:
Style/AccessorGrouping
(disabled by default),Style/BisectedAttrAccessor
andStyle/RedundantAssignment
- Support new cop introduced by rubocop v0.86:
Style/RedundantFetchBlock
- Support new cops introduced by rubocop v0.85:
Lint/MixedRegexpCaptureTypes
,Style/RedundantRegexpEscape
andStyle/RedundantRegexpCharacterClass
- Enable a new cop introduced by rubocop v0.84:
Lint/DeprecatedOpenSSLConstant
- Enable two cops introduced by rubocop v0.83:
Layout/EmptyLinesAroundAttributeAccessor
andStyle/SlicingWithRange
- Enable two cops introduced by rubocop v0.81:
Lint/RaiseException
andLint/StructNewOverride
- Bump rubocop version to v0.82 and enable two new cops (
Layout/SpaceAroundMethodCallOperator
andStyle/ExponentialNotation
)
- Bump rubocop version to v0.80 and enable new Hash style cops
- Bump rubocop version to v0.78 [#62]
- Bump rubocop version to v0.77 [#61]
- Actually use rubocop-performance by default [#60]
- Add rubocop-performance lib [#59]
- Disable RSpec/ImplicitBlockExpectation [#58]
- Bump rubocop version to v0.76 [#57]
- Bump rubocop version to v0.75 [#55]
- Bump rubocop version to v0.70 [#51]
- Bump rubocop-rspec version to v1.33.0 [#51]
- Disable
Style/ModuleFunction
cop, as it is not quite correct
- Bump rubocop version to v0.60
- Bump rubocop version to v0.58
- Disable new
Style/AccessModifierDeclarations
cop which is buggy
- Bump rubocop version to v0.57.0
- Remove
Lint/SplatKeywordArguments
configuration
- Bump rubocop-rspec to v1.25
- Enable rspec pending validation
RSpec/Pending
- Replaced by 2.3.9
- Bump rubocop of v0.56.0
- Disable the new
Lint/SplatKeywordArguments
cop which is buggy
- Bump rubocop to v0.55.0
- Bump rubocop to v0.54.0
- Bump rubocop-rspec to v1.24
- Bump rubocop to v0.53.0, renaming a few cops in the configuration to match their new names
- Enable the
Lint/UnneededCopEnableDirective
cop, to work alongside the already-enabledLint/UnneededCopDisableDirective
cop - Fix
validate_config.rb
so it correctly outputs any problems with therubocop.yml
file, rather than just exiting silently with an appropriate code
Bump rubocop-rspec
to v1.22.0
Configure the RSpec/MessageSpies
cop to enforce that message
expectations should be set using .to receive
, not
.to have_received
(#17)
Include rubocop
and rubocop-rspec
as production dependencies, automatically installed
with this gem, so we can control the versions which are installed (#15)
Include rubocop-rspec
and configure it as we
do in other projects to enforce good style in RSpec specs (#13)
Enable Rubocop's DisplayStyleGuide
and ExtraDetails
options so more helpful error messages are displayed for offences (see 1de8a18 for further details)
Rename the gem to gc_ruboconfig
ahead of release on RubyGems (see d73dbee for details)
- Bump rubocop to 0.52.1
- Re-enable the
Style/FormatStringToken
cop which was temporarily disabled in v1.2.1
Disable the Style/FormatStringToken
cop, which currently generates false positives against date format strings
Bump rubocop to 0.52.0
Bump rubocop to 0.51.0
Fix invalid cop name
Initial release