Skip to content

Commit 323a29d

Browse files
authored
add example for disallowed html tags check (#508)
1 parent fb53fcf commit 323a29d

3 files changed

Lines changed: 12 additions & 0 deletions

File tree

azdev/operations/linter/rules/command_group_rules.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@ def disallowed_html_tag_from_command_group(linter, command_group_name):
5454
linter.diffed_lines)):
5555
raise RuleError("Disallowed html tags {} in short summary. "
5656
"If the content is a placeholder, please remove <> or wrap it with backtick. "
57+
"For example: 1) <Name>-res.yaml -> `<Name>-res.yaml`; "
58+
"2) http://<URL>:<PORT> -> `http://<URL>:<PORT>`. "
5759
"For more info please refer to: {}".format(disallowed_tags,
5860
DISALLOWED_HTML_TAG_RULE_LINK))
5961
if help_entry.long_summary and (disallowed_tags := has_illegal_html_tag(help_entry.long_summary,
6062
linter.diffed_lines)):
6163
raise RuleError("Disallowed html tags {} in long summary. "
6264
"If content is a placeholder, please remove <> or wrap it with backtick. "
65+
"For example: 1) <Name>-res.yaml -> `<Name>-res.yaml`; "
66+
"2) http://<URL>:<PORT> -> `http://<URL>:<PORT>`. "
6367
"For more info please refer to: {}".format(disallowed_tags,
6468
DISALLOWED_HTML_TAG_RULE_LINK))
6569

azdev/operations/linter/rules/command_rules.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,16 @@ def disallowed_html_tag_from_command(linter, command_name):
4949
linter.diffed_lines)):
5050
raise RuleError("Disallowed html tags {} in short summary. "
5151
"If the content is a placeholder, please remove <> or wrap it with backtick. "
52+
"For example: 1) <Name>-res.yaml -> `<Name>-res.yaml`; "
53+
"2) http://<URL>:<PORT> -> `http://<URL>:<PORT>`. "
5254
"For more info please refer to: {}".format(disallowed_tags,
5355
DISALLOWED_HTML_TAG_RULE_LINK))
5456
if help_entry.long_summary and (disallowed_tags := has_illegal_html_tag(help_entry.long_summary,
5557
linter.diffed_lines)):
5658
raise RuleError("Disallowed html tags {} in long summary. "
5759
"If content is a placeholder, please remove <> or wrap it with backtick. "
60+
"For example: 1) <Name>-res.yaml -> `<Name>-res.yaml`; "
61+
"2) http://<URL>:<PORT> -> `http://<URL>:<PORT>`. "
5862
"For more info please refer to: {}".format(disallowed_tags,
5963
DISALLOWED_HTML_TAG_RULE_LINK))
6064

azdev/operations/linter/rules/parameter_rules.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,13 +183,17 @@ def disallowed_html_tag_from_parameter(linter, command_name, parameter_name):
183183
linter.diffed_lines)):
184184
raise RuleError("Disallowed html tags {} in short summary. "
185185
"If the content is a placeholder, please remove <> or wrap it with backtick. "
186+
"For example: 1) <Name>-res.yaml -> `<Name>-res.yaml`; "
187+
"2) http://<URL>:<PORT> -> `http://<URL>:<PORT>`. "
186188
"For more info please refer to: {}".format(disallowed_tags,
187189
DISALLOWED_HTML_TAG_RULE_LINK))
188190

189191
if help_entry.long_summary and (disallowed_tags := has_illegal_html_tag(help_entry.long_summary,
190192
linter.diffed_lines)):
191193
raise RuleError("Disallowed html tags {} in long summary. "
192194
"If content is a placeholder, please remove <> or wrap it with backtick. "
195+
"For example: 1) <Name>-res.yaml -> `<Name>-res.yaml`; "
196+
"2) http://<URL>:<PORT> -> `http://<URL>:<PORT>`. "
193197
"For more info please refer to: {}".format(disallowed_tags,
194198
DISALLOWED_HTML_TAG_RULE_LINK))
195199

0 commit comments

Comments
 (0)