fix misspellings in predicate names

This commit is contained in:
Erik Krogh Kristensen
2022-05-24 10:57:13 +02:00
parent be453142b8
commit d1ad08ecb5
3 changed files with 10 additions and 7 deletions

View File

@@ -73,7 +73,10 @@ predicate isExternsFile(File f) {
/**
* Holds if `f` contains library code.
*/
predicate isLibaryFile(File f) { f.getATopLevel() instanceof FrameworkLibraryInstance }
predicate isLibraryFile(File f) { f.getATopLevel() instanceof FrameworkLibraryInstance }
/** DEPRECATED: Alias for isLibraryFile */
deprecated predicate isLibaryFile = isLibraryFile/1;
/**
* Holds if `f` contains template code.
@@ -106,7 +109,7 @@ predicate classify(File f, string category) {
or
isExternsFile(f) and category = "externs"
or
isLibaryFile(f) and category = "library"
isLibraryFile(f) and category = "library"
or
isTemplateFile(f) and category = "template"
}

View File

@@ -35,10 +35,10 @@ module History {
/**
* A user-controlled location value read from the [history](http://npmjs.org/package/history) library.
*/
private class HistoryLibaryRemoteFlow extends ClientSideRemoteFlowSource {
private class HistoryLibraryRemoteFlow extends ClientSideRemoteFlowSource {
ClientSideRemoteFlowKind kind;
HistoryLibaryRemoteFlow() {
HistoryLibraryRemoteFlow() {
exists(API::Node loc | loc = [getBrowserHistory(), getHashHistory()].getMember("location") |
this = loc.getMember("hash").getAnImmediateUse() and kind.isFragment()
or

View File

@@ -96,7 +96,7 @@ predicate allBackslashesEscaped(DataFlow::Node nd) {
/**
* Holds if `repl` looks like a call to "String.prototype.replace" that deliberately removes the first occurrence of `str`.
*/
predicate removesFirstOccurence(StringReplaceCall repl, string str) {
predicate removesFirstOccurrence(StringReplaceCall repl, string str) {
not exists(repl.getRegExp()) and repl.replaces(str, "")
}
@@ -117,8 +117,8 @@ predicate isDelimiterUnwrapper(
or
left = "'" and right = "'"
|
removesFirstOccurence(leftUnwrap, left) and
removesFirstOccurence(rightUnwrap, right) and
removesFirstOccurrence(leftUnwrap, left) and
removesFirstOccurrence(rightUnwrap, right) and
leftUnwrap.getAMethodCall() = rightUnwrap
)
}