Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable recently problematic rules #125

Merged
merged 2 commits into from
Feb 16, 2021
Merged

Disable recently problematic rules #125

merged 2 commits into from
Feb 16, 2021

Commits on Feb 16, 2021

  1. Disable RSpec/MultipleMemoizedHelpers rule

    This is a new rule that was introduced in rubocop-rspec 1.43.0 [1] which
    sets a limit on the amount of `let` definitions you can have within an
    RSpec block (defaulting to 5).
    
    This has been disabled as per our preference to not have cops that are
    based on arbitrary limits.
    
    [1]: https://github.com/rubocop-hq/rubocop-rspec/blob/master/CHANGELOG.md#1430-2020-08-17
    kevindew committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    9fac9f6 View commit details
    Browse the repository at this point in the history
  2. Disable Naming/VariableNumber

    This rule enforces whether numbers are prefixed with underscores in
    variable names, for example normalcase is var1 and snake_case is var_1.
    Applying this rule to GOV.UK projects has been challenging and has
    presented concerns about reduced readability [1]
    
    In Rubocop 1.2.0 this cop was extended to enforce method names and
    symbols. This looked to present further readability concerns for GOV.UK
    and a large amount of code that would need fixing, as GOV.UK has tended
    to favour snake_case for these by precedence.
    
    It would make sense to adopt snake_case, if we were forced to choose a
    convention, over normalcase given the existing precedence in GOV.UK.
    However as we have previously used the normalcase rule switching to this
    would create further churn to be fixed. The simplest approach therefore
    seems to be disabling this rule and accepting both normalcase and
    snake_case as valid approaches in our naming.
    
    [1]: alphagov/smart-answers@54c1295
    kevindew committed Feb 16, 2021
    Configuration menu
    Copy the full SHA
    7437126 View commit details
    Browse the repository at this point in the history