From f9405280749a53ef3fc8a8da1f9e138a3c3b93e8 Mon Sep 17 00:00:00 2001 From: amitrahman1026 Date: Thu, 9 Nov 2023 01:29:19 -0500 Subject: [PATCH] Detect multi-line comment block (#34) Signed-off-by: amitrahman1026 --- src/advisors/cpp_exception.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/advisors/cpp_exception.ts b/src/advisors/cpp_exception.ts index 5cbfdbc..f967fe8 100644 --- a/src/advisors/cpp_exception.ts +++ b/src/advisors/cpp_exception.ts @@ -53,7 +53,8 @@ class CppExceptionAdvisor implements IAdvisor { if ( fileExt.includes(path.extname(m.file)) && !m.content.trim().startsWith("//") && - !m.content.trim().startsWith("/*") + !m.content.trim().startsWith("/*") && + !m.content.trim().endsWith("*/") ) { log.info( `The line with throw pattern is in file ${m.file} @ line ${m.line}:\n${m.content}`