Skip to content

Commit d1ad08e

Browse files
committed
fix misspellings in predicate names
1 parent be45314 commit d1ad08e

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

javascript/ql/lib/semmle/javascript/filters/ClassifyFiles.qll

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ predicate isExternsFile(File f) {
7373
/**
7474
* Holds if `f` contains library code.
7575
*/
76-
predicate isLibaryFile(File f) { f.getATopLevel() instanceof FrameworkLibraryInstance }
76+
predicate isLibraryFile(File f) { f.getATopLevel() instanceof FrameworkLibraryInstance }
77+
78+
/** DEPRECATED: Alias for isLibraryFile */
79+
deprecated predicate isLibaryFile = isLibraryFile/1;
7780

7881
/**
7982
* Holds if `f` contains template code.
@@ -106,7 +109,7 @@ predicate classify(File f, string category) {
106109
or
107110
isExternsFile(f) and category = "externs"
108111
or
109-
isLibaryFile(f) and category = "library"
112+
isLibraryFile(f) and category = "library"
110113
or
111114
isTemplateFile(f) and category = "template"
112115
}

javascript/ql/lib/semmle/javascript/frameworks/History.qll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ module History {
3535
/**
3636
* A user-controlled location value read from the [history](http://npmjs.org/package/history) library.
3737
*/
38-
private class HistoryLibaryRemoteFlow extends ClientSideRemoteFlowSource {
38+
private class HistoryLibraryRemoteFlow extends ClientSideRemoteFlowSource {
3939
ClientSideRemoteFlowKind kind;
4040

41-
HistoryLibaryRemoteFlow() {
41+
HistoryLibraryRemoteFlow() {
4242
exists(API::Node loc | loc = [getBrowserHistory(), getHashHistory()].getMember("location") |
4343
this = loc.getMember("hash").getAnImmediateUse() and kind.isFragment()
4444
or

javascript/ql/src/Security/CWE-116/IncompleteSanitization.ql

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ predicate allBackslashesEscaped(DataFlow::Node nd) {
9696
/**
9797
* Holds if `repl` looks like a call to "String.prototype.replace" that deliberately removes the first occurrence of `str`.
9898
*/
99-
predicate removesFirstOccurence(StringReplaceCall repl, string str) {
99+
predicate removesFirstOccurrence(StringReplaceCall repl, string str) {
100100
not exists(repl.getRegExp()) and repl.replaces(str, "")
101101
}
102102

@@ -117,8 +117,8 @@ predicate isDelimiterUnwrapper(
117117
or
118118
left = "'" and right = "'"
119119
|
120-
removesFirstOccurence(leftUnwrap, left) and
121-
removesFirstOccurence(rightUnwrap, right) and
120+
removesFirstOccurrence(leftUnwrap, left) and
121+
removesFirstOccurrence(rightUnwrap, right) and
122122
leftUnwrap.getAMethodCall() = rightUnwrap
123123
)
124124
}

0 commit comments

Comments
 (0)