lib/brakeman/report/ignore/interactive.rb in brakeman-min-3.4.0 vs lib/brakeman/report/ignore/interactive.rb in brakeman-min-3.4.1
- old
+ new
@@ -56,15 +56,17 @@
def initial_menu
HighLine.new.choose do |m|
m.choice "Inspect all warnings" do
@skip_ignored = false
+ pre_show_help
process_warnings
end
m.choice "Hide previously ignored warnings" do
@skip_ignored = true
+ pre_show_help
process_warnings
end
m.choice "Prune obsolete ignored warnings" do
prune_obsolete
@@ -90,23 +92,32 @@
m.choice "u"
m.choice "a"
m.choice "s"
m.choice "q"
m.choice "?" do
- say <<-HELP
+ show_help
+ "?"
+ end
+ end
+ end
+
+ def pre_show_help
+ say "-" * 20
+ say "Actions:", :cyan
+ show_help
+ end
+
+ def show_help
+ say <<-HELP
i - Add warning to ignore list
n - Add warning to ignore list and add note
s - Skip this warning (will remain ignored or shown)
u - Remove this warning from ignore list
a - Ignore this warning and all remaining warnings
k - Skip this warning and all remaining warnings
q - Quit, do not update ignored warnings
? - Display this help
- HELP
-
- "?"
- end
- end
+ HELP
end
def penultimate_menu
obsolete = @ignore_config.obsolete_fingerprints
return unless obsolete.any?