mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
patch upper-case acronyms to be PascalCase
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
import javascript
|
||||
import semmle.javascript.RestrictedLocations
|
||||
|
||||
predicate isRepeatedDependency(AngularJS::InjectableFunction f, string name, ASTNode location) {
|
||||
predicate isRepeatedDependency(AngularJS::InjectableFunction f, string name, AstNode location) {
|
||||
exists(int i, int j |
|
||||
i < j and
|
||||
exists(f.getDependencyDeclaration(i, name)) and
|
||||
@@ -20,7 +20,7 @@ predicate isRepeatedDependency(AngularJS::InjectableFunction f, string name, AST
|
||||
)
|
||||
}
|
||||
|
||||
from AngularJS::InjectableFunction f, ASTNode node, string name
|
||||
from AngularJS::InjectableFunction f, AstNode node, string name
|
||||
where
|
||||
isRepeatedDependency(f, name, node) and
|
||||
not count(f.asFunction().getParameterByName(name)) > 1 // avoid duplicating reports from js/duplicate-parameter-name
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
import javascript
|
||||
import semmle.javascript.RestrictedLocations
|
||||
|
||||
from AngularJS::InjectableFunction f, ASTNode explicitInjection
|
||||
from AngularJS::InjectableFunction f, AstNode explicitInjection
|
||||
where
|
||||
count(f.getAnExplicitDependencyInjection()) > 1 and
|
||||
explicitInjection = f.getAnExplicitDependencyInjection()
|
||||
|
||||
@@ -21,7 +21,7 @@ predicate isUnusedParameter(Function f, string msg, Parameter parameter) {
|
||||
)
|
||||
}
|
||||
|
||||
predicate isMissingParameter(AngularJS::InjectableFunction f, string msg, ASTNode location) {
|
||||
predicate isMissingParameter(AngularJS::InjectableFunction f, string msg, AstNode location) {
|
||||
exists(int paramCount, int injectionCount |
|
||||
DataFlow::valueNode(location) = f and
|
||||
paramCount = f.asFunction().getNumParameter() and
|
||||
@@ -41,7 +41,7 @@ predicate isMissingParameter(AngularJS::InjectableFunction f, string msg, ASTNod
|
||||
)
|
||||
}
|
||||
|
||||
from AngularJS::InjectableFunction f, string message, ASTNode location
|
||||
from AngularJS::InjectableFunction f, string message, AstNode location
|
||||
where
|
||||
isUnusedParameter(f.asFunction(), message, location) or isMissingParameter(f, message, location)
|
||||
select location.(FirstLineOf), message
|
||||
|
||||
Reference in New Issue
Block a user