Skip to content

Commit e0c68c3

Browse files
authored
Merge pull request #10605 from erik-krogh/allow-getURL
QL: allow getURL as an acronym
2 parents b448206 + 2b31647 commit e0c68c3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ predicate shouldBePascalCased(string name, AstNode node, string kind) {
3737
not node.hasAnnotation("deprecated") and
3838
// allowed upper-case acronyms.
3939
not name.regexpMatch(".*(PEP|AES|DES|EOF).*") and
40+
not name = "getURL" and // getURL is a language feature
4041
not (name.regexpMatch("T[A-Z]{3}[^A-Z].*") and node instanceof NewTypeBranch) and
4142
not (name.regexpMatch("T[A-Z]{3}[^A-Z].*") and node instanceof NewType) and
4243
not name.toUpperCase() = name // We are OK with fully-uppercase names.

ql/ql/src/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ suites: codeql-suites
66
defaultSuiteFile: codeql-suites/ql-code-scanning.qls
77
extractor: ql
88
dependencies:
9-
codeql/typos: 0.0.1-dev
9+
codeql/typos: 0.0.2-dev

0 commit comments

Comments
 (0)