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

@@ -49,7 +49,7 @@ predicate benignContext(Expr e) {
e.getParent().(ExprStmt).getParent() instanceof CodeInAttribute
or
// and JSX-attributes.
e = any(JSXAttribute attr).getValue()
e = any(JsxAttribute attr).getValue()
or
exists(AwaitExpr await | await.getOperand() = e and benignContext(await))
or

View File

@@ -139,12 +139,12 @@ predicate whitelist(Expr e) {
* The return value of `e` may have other uses besides the truthiness check,
* but if the truthiness check always goes one way, it still indicates an error.
*/
predicate isConditional(ASTNode cond, Expr e) {
predicate isConditional(AstNode cond, Expr e) {
isExplicitConditional(cond, e) or
e = cond.(LogicalBinaryExpr).getLeftOperand()
}
from ASTNode cond, DataFlow::AnalyzedNode op, boolean cv, ASTNode sel, string msg
from AstNode cond, DataFlow::AnalyzedNode op, boolean cv, AstNode sel, string msg
where
isConditional(cond, op.asExpr()) and
cv = op.getTheBooleanValue() and

View File

@@ -9,7 +9,7 @@ import javascript
* `e` and checks its value for truthiness, and the return value of `e`
* is not used for anything other than this truthiness check.
*/
predicate isExplicitConditional(ASTNode cond, Expr e) {
predicate isExplicitConditional(AstNode cond, Expr e) {
e = cond.(IfStmt).getCondition()
or
e = cond.(LoopStmt).getTest()