Skip to content

Commit 36ed565

Browse files
committed
QL: remove acronym FP related to IPA types
1 parent d2a061f commit 36ed565

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ql/ql/src/codeql_ql/style/AcronymsShouldBeCamelCaseQuery.qll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ predicate shouldBePascalCased(string name, AstNode node, string kind) {
6363
not node.hasAnnotation("deprecated") and
6464
// allowed upper-case acronyms.
6565
not name.regexpMatch(".*(PEP|AES|DES|EOF).*") and
66-
not (name.regexpMatch("T[A-Z]{3}[^A-Z].*") and node instanceof NewTypeBranch) and
66+
not (
67+
name.regexpMatch("T[A-Z]{3}[^A-Z].*") and
68+
(node instanceof NewTypeBranch or node instanceof NewType)
69+
) and
6770
not name.toUpperCase() = name // We are OK with fully-uppercase names.
6871
}

0 commit comments

Comments
 (0)