1
0
Fork 0
mirror of https://github.com/thoughtbot/shoulda-matchers.git synced 2022-11-09 12:01:38 -05:00
Commit graph

19 commits

Author SHA1 Message Date
Pedro Paiva
0cc461d4d9
Remove ruby 2.5 support (#1415)
* Remove Ruby 2.5 support

* Setting the target Ruby version to 2.6 on Rubocop

* Fix Style/SlicingWithRange: Prefer ary[n..] over ary[n..-1] offenses
2021-03-04 20:42:47 -03:00
Pedro Paiva
ec93ea9052
Remove Ruby 2.4 support (#1412)
* Remove Ruby 2.4 support

* Fix: Style/RedundantBegin: Redundant begin block detected
2021-02-11 08:58:16 -03:00
Kapil Sachdev
b7e02184d9 fix(rubocop): Fix Layout/LineLength
- bump rubocop to v1.0
- Fix Layout/MultilineAssignmentLayout and other remaining offences
- Exculde appraisal generated gemfiles in rubocop
- Replace NON_NUMERIC_VALUE constant with instance method against 
failing test case in  rails <= 5.1 and postgres adapter.
This is a defect in rails where a frozen string is modified in 
https://github.com/rails/rails/blob/v5.1.7/activerecord/lib/active_record/connection_adapters/postgresql/oid/money.rb#L25
2020-11-03 10:05:25 -07:00
Kapil Sachdev
3e88500318 fix(rubocop): Fix Style, Layout, Lint and other offenses [ci skip]
Updated Layout/LineLength cop to Max 120 lenght and ignore everything 
inside specs/**/*

Added rules for below cops in .rubocop.yml
Lint/AmbiguousBlockAssociation
Naming/HeredocDelimiterNaming
Rails/SkipsModelValidations
Style/FormatStringToken


Fixed below mentioned cops:
- Layout/CaseIndentation
- Layout/DotPosition
- Layout/ElseAlignment
- Layout/IndentationWidth
- Layout/LineLength
- Layout/MultilineBlockLayout
- Layout/MultilineOperationIndentation
- Lint/AmbiguousBlockAssociation
- Lint/MissingCopEnableDirective
- Lint/NestedMethodDefinition
- Lint/RedundantCopDisableDirective
- Lint/RedundantRequireStatement
- Lint/UnusedBlockArgument
- Lint/UnusedMethodArgument
- Metrics/ModuleLength
- Naming/MemoizedInstanceVariableName
- Naming/RescuedExceptionsVariableName
- Rails/Output
- Rails/Presence
- Security/Eval
- Security/Open
- Style/ClassCheck
- Style/CollectionMethods
- Style/ConditionalAssignment
- Style/EvalWithLocation
- Style/FormatStringToken
- Style/InverseMethods
- Style/MutableConstant
- Style/ParallelAssignment
- Style/RedundantBegin
- Style/RedundantCondition
- Style/RedundantInterpolation
- Style/RedundantSelf
- Style/RedundantSort
- Style/RescueStandardError
- Style/SafeNavigation
- Style/StringLiteralsInInterpolation
- Style/SymbolProc
2020-11-03 10:05:25 -07:00
Kapil Sachdev
ed0dcb82d9 Bump rubocop from 0.89.1 to 0.90 [ci skip]
- Sort cops alphabetically in .rubocop.yml
2020-11-03 10:05:25 -07:00
Utkarsh Gupta
8f7e1797c3 Add the Packaging extension of RuboCop
More about the extension can be found at:
https://docs.rubocop.org/rubocop-packaging/

Signed-off-by: Utkarsh Gupta <utkarsh@debian.org>
2020-09-12 19:41:15 -06:00
Pedro Paiva
9733122ce3 Bump Rubocop from 0.71.0 to 0.89.1
Fix warning: The Metrics/LineLength has the wrong namespace - should be Layout

Fix warning: The `Layout/AlignArguments` cop has been renamed to `Layout/ArgumentAlignment`.

Fix warning: The `Layout/AlignParameters` cop has been renamed to `Layout/ParameterAlignment`.

Fix warning: The `Layout/IndentHeredoc` cop has been renamed to `Layout/HeredocIndentation`.

Fix warning: The `Lint/HandleExceptions` cop has been renamed to `Lint/SuppressedException`.

Set new cops as disable for default
2020-08-31 16:39:04 -06:00
Elliot Winkler
34020fbf91 Turn off more Rubocop checks 2019-07-08 19:24:35 -06:00
Elliot Winkler
f52e785258 Fix warnings and linter violations in inclusion matcher 2019-06-13 00:39:00 -06:00
Elliot Winkler
5829f883fb Tweak Rubocop configuration 2019-06-09 01:56:32 -06:00
Elliot Winkler
002f15b6c7 Bring in Rails cops using rubocop-rails
After installing Rubocop 0.71, I received this warning:

    Rails cops will be removed from RuboCop 0.72. Use the `rubocop-rails` gem instead.

This commit follows these instructions.

[ci skip]
2019-06-07 21:57:40 -06:00
Elliot Winkler
4e2448d775 Teach have_db_index about expression indexes
In Rails 5, the schema layer was updated so that indexes could be
created on expressions rather that simply columns. Update
`have_db_index` so that you can test for this.

More reading: <edc2b77187>
2019-05-31 00:12:10 -06:00
Elliot Winkler
a5aea2ee24 Update Rubocop & Rubocop config 2019-05-30 21:15:52 -06:00
Elliot Winkler
9982926beb Tweak Rubocop config 2019-03-20 22:59:12 -07:00
Elliot Winkler
da4e6ddd06 Add failing tests for issue 1146 2019-01-29 23:33:06 -07:00
Elliot Winkler
13b2338312 Update Rubocop config
[ci skip]
2019-01-29 18:49:39 -07:00
Elliot Winkler
e2154f9e4e Simplify Rubocop configuration
The original Rubocop configuration was copied from other thoughtbot
projects. Of course, Rubocop comes with its own set of default settings.
Therefore, we don't need to re-specify settings that it already has --
we only need to specify the ones that we're overriding.

Besides this, Rubocop isn't even in the Gemfile, so even though Hound
runs on GitHub automatically, it'd be nice to spot style issues as you
are editing files.

Given this, this commit simplifies the Rubocop configuration and also
adds Rubocop to the Gemfile so that you can configure your editor to
lint files as you are editing them.
2018-10-04 21:30:01 -03:00
Elliot Winkler
ba5b663235 Update Rubocop settings 2018-01-24 00:52:01 -06:00
Elliot Winkler
e8f1492d5a Update .rubocop.yml
Import all of the Rubocop rules from Hound so that the comments that
Hound produces are the same ones that would be produced in Vim.

[ci skip]
2017-02-06 22:08:20 +01:00
Renamed from .hound_config/ruby.yml (Browse further)