Skip to content

Commit f8a1c23

Browse files
committed
~
1 parent 342cae4 commit f8a1c23

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

clang-tools-extra/docs/clang-tidy/checks/bugprone/unsafe-functions.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The check implements the following rules from the CERT C Coding Standard:
1717

1818
`cert-msc24-c` and `cert-msc33-c` redirect here as aliases of this check.
1919

20+
2021
Unsafe functions
2122
----------------
2223

llvm/utils/git/code-lint-helper.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,20 @@ def pr_comment_text_for_diff(
105105
</details>
106106
"""
107107

108+
# TODO: Refactor this
108109
def find_comment(self, pr: any) -> any:
110+
all_linter_names = [l.name for l in ALL_LINTERS]
111+
other_linter_names = [name for name in all_linter_names if name != self.name]
112+
113+
other_tags = [
114+
self.COMMENT_TAG.format(linter=name) for name in other_linter_names
115+
]
116+
109117
for comment in pr.as_issue().get_comments():
110-
if self.comment_tag in comment.body:
111-
return comment
118+
body = comment.body
119+
if self.comment_tag in body:
120+
if not any(other_tag in body for other_tag in other_tags):
121+
return comment
112122
return None
113123

114124
def update_pr(self, comment_text: str, args: LintArgs, create_new: bool) -> None:

0 commit comments

Comments
 (0)