1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00
Commit graph

15 commits

Author SHA1 Message Date
Daniel Colson
2e485eb6bf
Fix incorrectly namespaced Cop
See https://github.com/rubocop-hq/rubocop/releases/tag/v0.78.0
2020-01-17 14:44:33 -05:00
Daniel Colson
6d8bea1670
Update Rubocop to support new thoughtbot defaults
One annoyance is that the thoughtbot defaults include the Rails
cops, which don't quite make sense here. I am forced into loading the
rubocop-rails gem but then disabling all of the cops in it.
2020-01-17 14:43:34 -05:00
Nate Holland
41468b09f3
Bump rubocop to latest version (0.68.1)
This pushes rubocop to the latest version. They have since extracted out
the performance cops into the rubocop-performance gem. Those cops were
originally used so I pulled the gem in and required it.
2020-01-17 14:43:34 -05:00
Daniel Colson
cb9eb551c8
Arrest lines of an unsavory length
We had configured RuboCop to allow lines with up to 142 characters. This
PR fixes a few of the worst offenders so we can bring that number down
to 110.
2018-12-12 11:05:13 -05:00
Claire
c71aded778
Inline disabling Style/MethodMissing Cop
To make it obvious that these are non-standard cases.

Also add respond_to_missing? to the decorator.

We are using Style/MethodMissing rather than
Style/MethodMissingSuper and Style/MissingRespondToMissing because we
are still on RuboCop 0.54.
2018-11-12 15:01:23 -08:00
Daniel Colson
7925c47653 Remove remaining RuboCop TODOs
Closes #1202

We have fixed the bulk of the RuboCop TODOs. The main TODO remaining
(line length) involves a large number of files,
and I don't think it is worth trying to update them all at once. I did
fix a few of the worst offenders so we could bring the max down a bit.
We can gradually bring this number down as we fix more of the
violations.
2018-10-21 12:15:32 -04:00
Susan Wright
2995978188 Rubocop: Fix Layout/IndentHeredoc issues (#1215) 2018-10-07 22:46:58 -04:00
Susan Wright
c22c9ab052 Rubocop: Fix Style/StringLiterals Offenses (#1216) 2018-10-07 21:45:51 -04:00
Hunter Braun
89ee4a4524 [Rubocop] Style Cop Offenses (#1208) 2018-10-07 18:02:54 -04:00
Hunter Braun
6a25e989b6 [Rubocop] Lint Cop Offenses (#1207) 2018-10-05 14:54:08 -04:00
Daniel Colson
c9989e99e0
Use dedicated methods for memoized values (#1211)
RuboCop didn't seem to like having memoization in the
`default_constants` method that didn't match the method name. This
satisfies RuboCop, and saves us an array allocation or two when we run
specs that don't use any of these helpers.
2018-10-05 11:19:48 -04:00
Hunter Braun
95bd3c6076 [Rubocop] Performance Cop Offenses (#1209) 2018-10-04 21:07:56 -04:00
Daniel Colson
1b5a360b77 Avoid running RuboCop on tmp files 2018-09-27 21:43:33 -04:00
Colin Ross
a56b68bc9c Fix assorted RuboCop spacing volations (#1203)
* Alphabetize gem listing in various Gemfiles [Rubocop Bundler/OrderedGems]

* Fix alignment of if/else/end statement [Rubocop Layout/ElseAlignment]

* Method definitions should have a empty line between them [Rubocop Layout/EmptyLineBetweenDefs]

* Modules, Classes, and blocks should have an empty line around them [Rubocop]

Cops:
Layout/EmptyLinesAroundBlockBody
Layout/EmptyLinesAroundModuleBody
Layout/EmptyLinesAroundClassBody
Layout/EmptyLinesAroundAccessModifier

* Keep a blank line before and after access modifiers [Rubocop Layout/EmptyLinesAroundAccessModifier]

* Remove misc extra whitespace [Rubocop Layout/ExtraSpacing]

* Indent the first line of the right-hand-side of a multi-line assignment [Rubocop Layout/IndentAssignment]

* Remove extraneous whitespace [Rubocop]

Cops:
  Layout/IndentationWidth
  Layout/LeadingCommentSpace
  Layout/SpaceAroundEqualsInParameterDefault
  Layout/SpaceInsideArrayLiteralBrackets
  Layout/SpaceInsideBlockBraces
  Layout/SpaceInsideParens
  Layout/TrailingBlankLines

* Revert rubocop changes to gemfiles; exclude files from rubocop checks

The files in gemfiles/ are generated by Appraisal, so we shouldn't edit them. Instead, let's tell RuboCop to exclude this directory.
2018-09-27 21:35:05 -04:00
Christian Bruckmayer
5b0257363c Add rubocop
to run rubocop locally and not to wait for HoundCI to bark at us.

The version is locked to 0.54 because this is the version HoundCI is using.
Using a newer version will not work as config changed from 0.54 to currently 0.59
and rubocop would complain with the old configuration.

thoughtbot uses the .rubocop.yml in thoughtbot/guides
as the orginizational config on Hound, so we inherit
from it so we can use the same config locally.

Fix #1195.
2018-09-18 22:58:56 -04:00