alphagov / rubocop-govuk

RuboCop style rules for GOV.UK's Ruby projects
MIT License
11 stars 9 forks source link

4.0.0 pre-release issues #129

Closed kevindew closed 3 years ago

kevindew commented 3 years ago

With the 4.0.0 changes to rubocop-govuk there are quite a lot of new rules (1, 2) which make us unsure how big the impact will be for GOV.UK. Therefore we are releasing this version as a pre-release to help identify whether it presents any particular challenges for GOV.UK codebases before a wider release.

The approach to adding new rules is to favour consistency with the default rules of the upstream libraries (rubocop, rubcop-rails, etc) over individual opinions on approaches. We've aimed to disable only rules that would produce significant problems in applying to the GOV.UK codebase.

In this pre-release we should ensure that we test

To install this pre-release in app you need to update the Gemfile accordingly:

gem "rubocop-govuk, "4.0.0.pre-1"

This thread can be used to raise any concerns regarding these new rules, particularly where they conflict with GOV.UK conventions or require so many changes adoption will be very difficult.

Initially there have been 2 rules that have proved divisive, where wider opinions are welcomed, these are: Lint/MissingSuper and Lint/UselessMethodDefinition. There are also some concerns that these rules could be difficult to apply are Gemspec/RequiredRubyVersion, Style/CombinableLoops, Style/HashLikeCase. So it'd be good to learn if these are too painful to apply consistently.

kevindew commented 3 years ago

rubocop-govuk 4 is out and widely deployed across GOV.UK