@@ -174,7 +174,7 @@ def option_should_not_contain_under_score(linter, command_name, parameter_name):
174174 raise RuleError ("Argument's option {} contains '_' which should be '-' instead." .format (option ))
175175
176176
177- @ParameterRule (LinterSeverity .MEDIUM )
177+ @ParameterRule (LinterSeverity .HIGH )
178178def disallowed_html_tag_from_parameter (linter , command_name , parameter_name ):
179179 if linter .command_expired (command_name ) or not linter .get_parameter_help_info (command_name , parameter_name ):
180180 return
@@ -199,9 +199,11 @@ def broken_site_link_from_parameter(linter, command_name, parameter_name):
199199 if linter .command_expired (command_name ) or not linter .get_parameter_help_info (command_name , parameter_name ):
200200 return
201201 help_entry = linter .get_parameter_help_info (command_name , parameter_name )
202- if help_entry .short_summary and (broken_links := has_broken_site_links (help_entry .short_summary )):
202+ if help_entry .short_summary and (broken_links := has_broken_site_links (help_entry .short_summary ,
203+ linter .diffed_lines )):
203204 raise RuleError ("Broken links {} in short summary. "
204205 "If link is an example, please wrap it with backtick. " .format (broken_links ))
205- if help_entry .long_summary and (broken_links := has_broken_site_links (help_entry .long_summary )):
206+ if help_entry .long_summary and (broken_links := has_broken_site_links (help_entry .long_summary ,
207+ linter .diffed_lines )):
206208 raise RuleError ("Broken links {} in long summary. "
207209 "If link is an example, please wrap it with backtick. " .format (broken_links ))
0 commit comments