Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information