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

@@ -20,7 +20,7 @@ import javascript
* A comparison construct, that is, either an equality test or a switch case
* (which is implicitly compared to the switch statement's discriminant).
*/
class EqOrSwitch extends ASTNode {
class EqOrSwitch extends AstNode {
EqOrSwitch() {
this instanceof EqualityTest or
this instanceof Case

View File

@@ -18,7 +18,7 @@ import javascript
* Holds if `nd` is a use of deprecated language feature `type`, and `replacement`
* is the recommended replacement.
*/
predicate deprecated_feature(ASTNode nd, string type, string replacement) {
predicate deprecated_feature(AstNode nd, string type, string replacement) {
exists(FunctionExpr fe | fe = nd and fe.getBody() instanceof Expr |
type = "expression closures" and replacement = "arrow expressions"
)
@@ -38,6 +38,6 @@ predicate deprecated_feature(ASTNode nd, string type, string replacement) {
replacement = "standard method definitions"
}
from ASTNode depr, string type, string replacement
from AstNode depr, string type, string replacement
where deprecated_feature(depr, type, replacement)
select depr, "Use " + replacement + " instead of " + type + "."

View File

@@ -42,10 +42,10 @@ class CandidateStringLiteral extends StringLiteral {
* Gets an ancestor node of this string literal in the AST that can be reached without
* stepping over scope elements.
*/
ASTNode getIntermediate() {
AstNode getIntermediate() {
result = this
or
exists(ASTNode mid | mid = this.getIntermediate() |
exists(AstNode mid | mid = this.getIntermediate() |
not mid instanceof ScopeElement and
result = mid.getParent()
)

View File

@@ -11,7 +11,7 @@
import javascript
from JSONValue v, File f
from JsonValue v, File f
where
f = v.getFile() and
f.getExtension().regexpMatch("(?i)jsx?") and