mirror of
https://gitea.invidious.io/iv-org/shard-ameba.git
synced 2024-08-15 00:53:29 +00:00
Refactor usages of \
to sth more readable if possible
This commit is contained in:
parent
38eb5d5e50
commit
735ec2462a
2 changed files with 10 additions and 8 deletions
|
@ -184,10 +184,11 @@ module Ameba::Cli
|
|||
|
||||
private def print_rules(config)
|
||||
config.rules.each do |rule|
|
||||
puts \
|
||||
"#{rule.name.colorize(:white)} " \
|
||||
"[#{rule.severity.symbol.to_s.colorize(:green)}] - " \
|
||||
"#{rule.description.colorize(:dark_gray)}"
|
||||
puts "%s [%s] - %s" % {
|
||||
rule.name.colorize(:white),
|
||||
rule.severity.symbol.to_s.colorize(:green),
|
||||
rule.description.colorize(:dark_gray),
|
||||
}
|
||||
end
|
||||
exit 0
|
||||
end
|
||||
|
|
|
@ -45,10 +45,11 @@ module Ameba::Formatter
|
|||
end
|
||||
end
|
||||
output.puts
|
||||
output.puts \
|
||||
"[#{issue.rule.severity.symbol}] " \
|
||||
"#{issue.rule.name}: " \
|
||||
"#{issue.message}".colorize(:red)
|
||||
output.puts ("[%s] %s: %s" % {
|
||||
issue.rule.severity.symbol,
|
||||
issue.rule.name,
|
||||
issue.message,
|
||||
}).colorize(:red)
|
||||
|
||||
if show_affected_code && (code = affected_code(issue))
|
||||
output << code.colorize(:default)
|
||||
|
|
Loading…
Reference in a new issue