diff --git a/cpp_linter/clang_tools/clang_tidy.py b/cpp_linter/clang_tools/clang_tidy.py index 67d9384f..896585b9 100644 --- a/cpp_linter/clang_tools/clang_tidy.py +++ b/cpp_linter/clang_tools/clang_tidy.py @@ -82,6 +82,8 @@ def __init__( @property def diagnostic_link(self) -> str: """Creates a markdown link to the diagnostic documentation.""" + if self.diagnostic.startswith("clang-diagnostic-"): + return self.diagnostic link = f"[{self.diagnostic}](https://clang.llvm.org/extra/clang-tidy/checks/" return link + "{}/{}.html)".format(*self.diagnostic.split("-", maxsplit=1))