rubocop: Drop "o" from Naming/MethodParameterName allowlist

- I couldn't figure out what this would stand for, so I asked on Slack
  if anyone had better ideas otherwise I'd go with "ostrich" or
  "octopus". Rylan suggested "option", which is very sensible.
This commit is contained in:
Issy Long 2023-03-11 00:06:09 +00:00
parent 60d93310af
commit 0c86425d6a
No known key found for this signature in database
GPG Key ID: 8247C390DADC67D4
3 changed files with 5 additions and 6 deletions

View File

@ -189,7 +189,6 @@ Naming/MethodParameterName:
- AllowedNames
AllowedNames:
[
"o",
"pr",
]

View File

@ -18,9 +18,9 @@ class BuildEnvironment
self
end
sig { params(o: Symbol).returns(T.self_type) }
def <<(o)
@settings << o
sig { params(option: Symbol).returns(T.self_type) }
def <<(option)
@settings << option
self
end

View File

@ -139,8 +139,8 @@ class Options
map(&:flag)
end
def include?(o)
any? { |opt| opt == o || opt.name == o || opt.flag == o }
def include?(option)
any? { |opt| opt == option || opt.name == option || opt.flag == option }
end
alias to_ary to_a