mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
patch upper-case acronyms to be PascalCase
This commit is contained in:
@@ -1,17 +1,20 @@
|
||||
import semmle.javascript.frameworks.React
|
||||
|
||||
query predicate test_JSXname(JSXElement element, JSXName jsxname, string name, string type) {
|
||||
query predicate test_JSXname(JsxElement element, JsxName jsxname, string name, string type) {
|
||||
name = jsxname.getValue() and
|
||||
(
|
||||
jsxname instanceof Identifier and type = "Identifier"
|
||||
or
|
||||
jsxname instanceof ThisExpr and type = "thisExpr"
|
||||
or
|
||||
jsxname.(DotExpr).getBase() instanceof JSXName and type = "dot"
|
||||
jsxname.(DotExpr).getBase() instanceof JsxName and type = "dot"
|
||||
or
|
||||
jsxname instanceof JSXQualifiedName and type = "qualifiedName"
|
||||
jsxname instanceof JsxQualifiedName and type = "qualifiedName"
|
||||
) and
|
||||
element.getNameExpr() = jsxname
|
||||
}
|
||||
|
||||
query ThisExpr test_JSXName_this(JSXElement element) { result.getParentExpr+() = element }
|
||||
query ThisExpr test_JsxName_this(JsxElement element) { result.getParentExpr+() = element }
|
||||
|
||||
/** DEPRECATED: Alias for test_JsxName_this */
|
||||
deprecated ThisExpr test_JSXName_this(JSXElement element) { result = test_JsxName_this(element) }
|
||||
|
||||
Reference in New Issue
Block a user