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.

View File

@@ -726,8 +726,8 @@ module PluginManager
end
end
end
echoln ""
if scripts.length > 0
echoln ""
Console.echo_h2("Successfully loaded #{scripts.length} plugin(s)", text: :green)
else
Console.echo_h2("No plugins found", text: :green)

View File

@@ -522,6 +522,7 @@ def pbMessageDisplay(msgwindow, message, letterbyletter = true, commandProc = ni
signWaitTime = Graphics.frame_rate / 2
haveSpecialClose = false
specialCloseSE = ""
startSE = nil
controls.length.times do |i|
control = controls[i][0]
param = controls[i][1]