From 7657ec127c148a362f7c930e8d9eb09c89e98dfc Mon Sep 17 00:00:00 2001 From: Brandon High Date: Thu, 5 Mar 2020 12:06:21 -0800 Subject: [PATCH] Rubocop rule updates This commit: * explicitly defines some short variable names that generally make sense in the codebase. * set numeric comparisons to be enforced instead of the predicate style --- .rubocop.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.rubocop.yml b/.rubocop.yml index a79ebcf..ec42bff 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -80,3 +80,17 @@ Style/HashTransformKeys: # Added in 0.80, don't really care about the change Style/HashTransformValues: Enabled: false + +# These short variable names make sense as exceptions to the rule, but generally I think short variable names do hurt readability +Naming/MethodParameterName: + AllowedNames: + - vm + - dc + - s + - x + - f + +# Standard comparisons seem more readable +Style/NumericPredicate: + Enabled: true + EnforcedStyle: comparison \ No newline at end of file