diff --git a/src/ameba/cli/cmd.cr b/src/ameba/cli/cmd.cr index 71051724..6cebd608 100644 --- a/src/ameba/cli/cmd.cr +++ b/src/ameba/cli/cmd.cr @@ -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 diff --git a/src/ameba/formatter/dot_formatter.cr b/src/ameba/formatter/dot_formatter.cr index 788d9135..38575e18 100644 --- a/src/ameba/formatter/dot_formatter.cr +++ b/src/ameba/formatter/dot_formatter.cr @@ -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)