lib/reviewer/guidance.rb in reviewer-0.1.4 vs lib/reviewer/guidance.rb in reviewer-0.1.5

- old
+ new

@@ -48,11 +48,17 @@ # Shows the recovery guidance for when a command is missing # # @return [void] prints missing executable guidance def show_missing_executable_guidance - output.missing_executable_guidance(command) + tool = command.tool + installation_command = Command.new(tool, :install).string if tool.installable? + install_link = tool.install_link + + output.failure("Missing executable for '#{tool}'", command: command) + output.guidance('Try installing the tool:', installation_command) + output.guidance('Read the installation guidance:', install_link) end # Shows the recovery guidance for when a command generates an unrecoverable error # # @return [void] prints unrecoverable error guidance @@ -62,12 +68,10 @@ # Shows suggestions for ignoring or disable rules when a command fails after reviewing code # # @return [void] prints syntax guidance def show_syntax_guidance - output.syntax_guidance( - ignore_link: command.tool.links[:ignore_syntax], - disable_link: command.tool.links[:disable_syntax] - ) + output.guidance('Selectively Ignore a Rule:', command.tool.links[:ignore_syntax]) + output.guidance('Fully Disable a Rule:', command.tool.links[:disable_syntax]) end end end