Skip to content

Commit 88ed840

Browse files
committed
Add check for (v)print_debug to msftidy
1 parent 4224008 commit 88ed840

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tools/msftidy.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,15 @@ def check_invalid_url_scheme
601601
end
602602
end
603603

604+
# Check for (v)print_debug usage, since it doesn't exist anymore
605+
#
606+
# @see https://github.com/rapid7/metasploit-framework/issues/3816
607+
def check_print_debug
608+
if @source =~ /print_debug/
609+
error('Please don\'t use (v)print_debug, use vprint_(status|good|error|warning) instead')
610+
end
611+
end
612+
604613
private
605614

606615
def load_file(file)
@@ -650,6 +659,7 @@ def run_checks(full_filepath)
650659
tidy.check_sock_get
651660
tidy.check_udp_sock_get
652661
tidy.check_invalid_url_scheme
662+
tidy.check_print_debug
653663
return tidy
654664
end
655665

0 commit comments

Comments
 (0)