More additions to .rubocop.yml, minor code tweaks

This commit is contained in:
Maruno17
2021-12-22 21:01:37 +00:00
parent 022dc7aadb
commit 514fe13ca2
3 changed files with 18 additions and 4 deletions

View File

@@ -79,6 +79,11 @@ Security/MarshalLoad:
Style/AccessorGrouping:
Enabled: false
# The assign_to_condition style looks awful, indenting loads of lines and
# increasing the separation between variable and value being assigned to it.
Style/ConditionalAssignment:
EnforcedStyle: assign_inside_condition
# Check with yard instead.
Style/Documentation:
Enabled: false
@@ -101,6 +106,12 @@ Style/HashSyntax:
Style/NegatedIf:
Enabled: false
# Following this just means that calls to an affected method need to know what
# that method calls its parameters, which is ridiculous. Keep things short and
# simple.
Style/OptionalBooleanParameter:
Enabled: false
# has_key? and has_value? are far more readable than key? and value?
Style/PreferredHashMethods:
Enabled: false
@@ -125,11 +136,13 @@ Style/SingleLineMethods:
Style/StringLiterals:
EnforcedStyle: double_quotes
# This cop requires arrays of symbols to be written like %i[BULBASAUR IVYSAUR].
# We don't need that nonsense. [:BULBASAUR, :IVYSAUR] is clearer and introduces
# no additional syntax to confuse people.
# This cop requires arrays of symbols/text to be written like %i[a b c]. We
# don't need that nonsense. ["a", "b", "c"] is clearer and introduces no
# additional syntax to confuse people.
Style/SymbolArray:
EnforcedStyle: brackets
Style/WordArray:
EnforcedStyle: brackets
# Patentheses around the condition in a ternary operator helps to differentiate
# it from the true/false results.