QL: allow getURL as an acronym

This commit is contained in:
erik-krogh
2022-09-28 13:14:48 +02:00
parent a48b893ed6
commit a10a2c2b01

View File

@@ -37,6 +37,7 @@ predicate shouldBePascalCased(string name, AstNode node, string kind) {
not node.hasAnnotation("deprecated") and
// allowed upper-case acronyms.
not name.regexpMatch(".*(PEP|AES|DES|EOF).*") and
not name = "getURL" and // getURL is a language feature
not (name.regexpMatch("T[A-Z]{3}[^A-Z].*") and node instanceof NewTypeBranch) and
not (name.regexpMatch("T[A-Z]{3}[^A-Z].*") and node instanceof NewType) and
not name.toUpperCase() = name // We are OK with fully-uppercase names.