Skip to content

Commit 87e7034

Browse files
committed
Declarations1: fix DCL31-C string match
1 parent 6a48f42 commit 87e7034

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

c/cert/src/rules/DCL31-C/DeclareIdentifiersBeforeUsingThem.ql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ import codingstandards.c.cert
1717
from Declaration d
1818
where
1919
not isExcluded(d, Declarations1Package::declareIdentifiersBeforeUsingThemQuery()) and
20-
exists(Specifier s | s = d.getASpecifier() and s.toString().regexpMatch("implicit_.*"))
20+
exists(Specifier s | s = d.getASpecifier() and s.toString() = "implicit_int") and
21+
exists(d.getFile().getRelativePath())
2122
select d, "Declaration is missing a type specifier."

0 commit comments

Comments
 (0)