patch upper-case acronyms to be PascalCase

This commit is contained in:
Erik Krogh Kristensen
2022-03-11 11:10:33 +01:00
parent e3a15792fa
commit 69353bb014
422 changed files with 3532 additions and 2244 deletions

View File

@@ -24,7 +24,7 @@ predicate exprWithoutEnclosingStmt(Expr e) {
// Some expressions have non-expression parents that we want to skip over.
exprWithoutEnclosingStmt(e.getParent().(Property).getObjectExpr()) or
exprWithoutEnclosingStmt(e.getParent().(PropertyPattern).getObjectPattern()) or
exprWithoutEnclosingStmt(e.getParent().(JSXAttribute).getElement())
exprWithoutEnclosingStmt(e.getParent().(JsxAttribute).getElement())
}
/**
@@ -65,7 +65,7 @@ predicate ast_consistency(string clsname, string problem, string what) {
not exists(l.getLocation()) and problem = "no location" and what = l.toString()
)
or
exists(ASTNode nd | clsname = nd.getAQlClass() |
exists(AstNode nd | clsname = nd.getAQlClass() |
uniqueness_error(count(nd.getTopLevel()), "getTopLevel", problem) and
what = "at " + nd.getLocation()
)
@@ -120,7 +120,7 @@ predicate location_consistency(string clsname, string problem, string what) {
/**
* Holds if function or toplevel `sc` is expected to have an associated control flow graph.
*/
predicate hasCFG(StmtContainer sc) { not exists(Error err | err.getFile() = sc.getFile()) }
predicate hasCfg(StmtContainer sc) { not exists(Error err | err.getFile() = sc.getFile()) }
/**
* Holds if a contract involving the CFG structure is violated, where `clsname`
@@ -128,7 +128,7 @@ predicate hasCFG(StmtContainer sc) { not exists(Error err | err.getFile() = sc.g
* the violation, and `what` gives location information.
*/
predicate cfg_consistency(string clsname, string problem, string what) {
exists(StmtContainer cont | clsname = cont.getAQlClass() and hasCFG(cont) |
exists(StmtContainer cont | clsname = cont.getAQlClass() and hasCfg(cont) |
uniqueness_error(count(cont.getEntry()), "getEntry", problem) and
what = "at " + cont.getLocation()
or
@@ -136,7 +136,7 @@ predicate cfg_consistency(string clsname, string problem, string what) {
what = "at " + cont.getLocation()
)
or
exists(ASTNode nd | clsname = nd.getAQlClass() and hasCFG(nd.getTopLevel()) |
exists(AstNode nd | clsname = nd.getAQlClass() and hasCfg(nd.getTopLevel()) |
uniqueness_error(count(nd.getFirstControlFlowNode()), "getFirstControlFlowNode", problem) and
what = "at " + nd.getLocation()
)