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)
|
private def print_rules(config)
|
||||||
config.rules.each do |rule|
|
config.rules.each do |rule|
|
||||||
puts \
|
puts "%s [%s] - %s" % {
|
||||||
"#{rule.name.colorize(:white)} " \
|
rule.name.colorize(:white),
|
||||||
"[#{rule.severity.symbol.to_s.colorize(:green)}] - " \
|
rule.severity.symbol.to_s.colorize(:green),
|
||||||
"#{rule.description.colorize(:dark_gray)}"
|
rule.description.colorize(:dark_gray),
|
||||||
|
}
|
||||||
end
|
end
|
||||||
exit 0
|
exit 0
|
||||||
end
|
end
|
||||||
|
|
|
@ -45,10 +45,11 @@ module Ameba::Formatter
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
output.puts
|
output.puts
|
||||||
output.puts \
|
output.puts ("[%s] %s: %s" % {
|
||||||
"[#{issue.rule.severity.symbol}] " \
|
issue.rule.severity.symbol,
|
||||||
"#{issue.rule.name}: " \
|
issue.rule.name,
|
||||||
"#{issue.message}".colorize(:red)
|
issue.message,
|
||||||
|
}).colorize(:red)
|
||||||
|
|
||||||
if show_affected_code && (code = affected_code(issue))
|
if show_affected_code && (code = affected_code(issue))
|
||||||
output << code.colorize(:default)
|
output << code.colorize(:default)
|
||||||
|
|
Loading…
Reference in a new issue