Skip to content

Commit

Permalink
Exclude specs from Metrics/BlockLength rubocop rule
Browse files Browse the repository at this point in the history
The default restriction of 25 lines per block doesn't play well with the
DSL style of RSpec as noted here [1].

Initially I investigated adding `rubocop-rspec` [2] to the `govuk-lint`
gem, but this then introduced a whole load more violations.

The change in this commit is a stop-gap solution. I plan to open an
issue on the `govuk-lint` repo to highlight the problem.

[1]: https://stackoverflow.com/questions/40934345/rubocop-25-line-block-size-and-rspec-tests#answer-41187163
[2]: https://github.com/backus/rubocop-rspec
  • Loading branch information
floehopper committed Jul 28, 2017
1 parent c16365f commit 9cb3ba3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Metrics/BlockLength:
Exclude:
- 'spec/**/*_spec.rb'

0 comments on commit 9cb3ba3

Please sign in to comment.