Skip to content

Commit b1a94d8

Browse files
committed
Merge branch 'master' into get-an-assigned-value-join-order
2 parents 98c2fd8 + d28c4fb commit b1a94d8

File tree

74 files changed

+1128
-497
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1128
-497
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,3 @@
2121
/codeql/
2222

2323
csharp/extractor/Semmle.Extraction.CSharp.Driver/Properties/launchSettings.json
24-
.vscode

.vscode/tasks.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
// To run a task, select the `Terminal | Run Task...` menu option, and then select the task from
3+
// the list in the dropdown, or invoke the `Tasks: Run Task` command from the command palette/
4+
// To bind a keyboard shortcut to invoke a task, see https://code.visualstudio.com/docs/editor/tasks#_binding-keyboard-shortcuts-to-tasks.
5+
// See https://go.microsoft.com/fwlink/?LinkId=733558
6+
// for the documentation about the tasks.json format
7+
"version": "2.0.0",
8+
"tasks": [
9+
{
10+
"label": "Sync Identical Files",
11+
"type": "process",
12+
// Non-Windows OS will usually have Python 3 already installed at /usr/bin/python3.
13+
"command": "python3",
14+
"args": [
15+
"config/sync-files.py",
16+
"--latest"
17+
],
18+
"group": "build",
19+
"windows": {
20+
// On Windows, use whatever Python interpreter is configured for this workspace. The default is
21+
// just `python`, so if Python is already on the path, this will find it.
22+
"command": "${config:python.pythonPath}",
23+
},
24+
"problemMatcher": []
25+
}
26+
]
27+
}

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,15 @@ We welcome contributions to our standard library and standard checks. Do you hav
1414
## License
1515

1616
The code in this repository is licensed under the [MIT License](LICENSE) by [GitHub](https://github.com).
17+
18+
## Visual Studio Code integration
19+
20+
If you use Visual Studio Code to work in this repository, there are a few integration features to make development easier.
21+
22+
### CodeQL for Visual Studio Code
23+
24+
You can install the [CodeQL for Visual Studio Code](https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-codeql) extension to get syntax highlighting, IntelliSense, and code navigation for the QL language, as well as unit test support for testing CodeQL libraries and queries.
25+
26+
### Tasks
27+
28+
The `.vscode/tasks.json` file defines custom tasks specific to working in this repository. To invoke one of these tasks, select the `Terminal | Run Task...` menu option, and then select the desired task from the dropdown. You can also invoke the `Tasks: Run Task` command from the command palette.

change-notes/1.25/analysis-javascript.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
* Support for the following frameworks and libraries has been improved:
66
- [jGrowl](https://github.com/stanlemon/jGrowl)
7+
- [jQuery](https://jquery.com/)
78

89
## New queries
910

config/sync-files.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def choose_latest_file(files):
107107

108108
local_error_count = 0
109109
def emit_local_error(path, line, error):
110-
print('ERROR: ' + path + ':' + line + " - " + error)
110+
print('ERROR: ' + path + ':' + str(line) + " - " + error)
111111
global local_error_count
112112
local_error_count += 1
113113

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl.qll

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,12 +2293,13 @@ private class PathNodeSink extends PathNodeImpl, TPathNodeSink {
22932293
* a callable is recorded by `cc`.
22942294
*/
22952295
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) {
2296-
exists(
2297-
AccessPath ap0, Node midnode, Configuration conf, DataFlowCallable enclosing,
2298-
LocalCallContext localCC
2299-
|
2300-
pathIntoLocalStep(mid, midnode, cc, enclosing, sc, ap0, conf) and
2301-
localCC = getLocalCallContext(cc, enclosing)
2296+
exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC |
2297+
midnode = mid.getNode() and
2298+
conf = mid.getConfiguration() and
2299+
cc = mid.getCallContext() and
2300+
sc = mid.getSummaryCtx() and
2301+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
2302+
ap0 = mid.getAp()
23022303
|
23032304
localFlowBigStep(midnode, node, true, _, conf, localCC) and
23042305
ap = ap0
@@ -2331,20 +2332,6 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt
23312332
pathThroughCallable(mid, node, cc, ap) and sc = mid.getSummaryCtx()
23322333
}
23332334

2334-
pragma[nomagic]
2335-
private predicate pathIntoLocalStep(
2336-
PathNodeMid mid, Node midnode, CallContext cc, DataFlowCallable enclosing, SummaryCtx sc,
2337-
AccessPath ap0, Configuration conf
2338-
) {
2339-
midnode = mid.getNode() and
2340-
cc = mid.getCallContext() and
2341-
conf = mid.getConfiguration() and
2342-
localFlowBigStep(midnode, _, _, _, conf, _) and
2343-
enclosing = midnode.getEnclosingCallable() and
2344-
sc = mid.getSummaryCtx() and
2345-
ap0 = mid.getAp()
2346-
}
2347-
23482335
pragma[nomagic]
23492336
private predicate readCand(Node node1, Content f, Node node2, Configuration config) {
23502337
readDirect(node1, f, node2) and

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,12 +2293,13 @@ private class PathNodeSink extends PathNodeImpl, TPathNodeSink {
22932293
* a callable is recorded by `cc`.
22942294
*/
22952295
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) {
2296-
exists(
2297-
AccessPath ap0, Node midnode, Configuration conf, DataFlowCallable enclosing,
2298-
LocalCallContext localCC
2299-
|
2300-
pathIntoLocalStep(mid, midnode, cc, enclosing, sc, ap0, conf) and
2301-
localCC = getLocalCallContext(cc, enclosing)
2296+
exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC |
2297+
midnode = mid.getNode() and
2298+
conf = mid.getConfiguration() and
2299+
cc = mid.getCallContext() and
2300+
sc = mid.getSummaryCtx() and
2301+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
2302+
ap0 = mid.getAp()
23022303
|
23032304
localFlowBigStep(midnode, node, true, _, conf, localCC) and
23042305
ap = ap0
@@ -2331,20 +2332,6 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt
23312332
pathThroughCallable(mid, node, cc, ap) and sc = mid.getSummaryCtx()
23322333
}
23332334

2334-
pragma[nomagic]
2335-
private predicate pathIntoLocalStep(
2336-
PathNodeMid mid, Node midnode, CallContext cc, DataFlowCallable enclosing, SummaryCtx sc,
2337-
AccessPath ap0, Configuration conf
2338-
) {
2339-
midnode = mid.getNode() and
2340-
cc = mid.getCallContext() and
2341-
conf = mid.getConfiguration() and
2342-
localFlowBigStep(midnode, _, _, _, conf, _) and
2343-
enclosing = midnode.getEnclosingCallable() and
2344-
sc = mid.getSummaryCtx() and
2345-
ap0 = mid.getAp()
2346-
}
2347-
23482335
pragma[nomagic]
23492336
private predicate readCand(Node node1, Content f, Node node2, Configuration config) {
23502337
readDirect(node1, f, node2) and

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,12 +2293,13 @@ private class PathNodeSink extends PathNodeImpl, TPathNodeSink {
22932293
* a callable is recorded by `cc`.
22942294
*/
22952295
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) {
2296-
exists(
2297-
AccessPath ap0, Node midnode, Configuration conf, DataFlowCallable enclosing,
2298-
LocalCallContext localCC
2299-
|
2300-
pathIntoLocalStep(mid, midnode, cc, enclosing, sc, ap0, conf) and
2301-
localCC = getLocalCallContext(cc, enclosing)
2296+
exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC |
2297+
midnode = mid.getNode() and
2298+
conf = mid.getConfiguration() and
2299+
cc = mid.getCallContext() and
2300+
sc = mid.getSummaryCtx() and
2301+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
2302+
ap0 = mid.getAp()
23022303
|
23032304
localFlowBigStep(midnode, node, true, _, conf, localCC) and
23042305
ap = ap0
@@ -2331,20 +2332,6 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt
23312332
pathThroughCallable(mid, node, cc, ap) and sc = mid.getSummaryCtx()
23322333
}
23332334

2334-
pragma[nomagic]
2335-
private predicate pathIntoLocalStep(
2336-
PathNodeMid mid, Node midnode, CallContext cc, DataFlowCallable enclosing, SummaryCtx sc,
2337-
AccessPath ap0, Configuration conf
2338-
) {
2339-
midnode = mid.getNode() and
2340-
cc = mid.getCallContext() and
2341-
conf = mid.getConfiguration() and
2342-
localFlowBigStep(midnode, _, _, _, conf, _) and
2343-
enclosing = midnode.getEnclosingCallable() and
2344-
sc = mid.getSummaryCtx() and
2345-
ap0 = mid.getAp()
2346-
}
2347-
23482335
pragma[nomagic]
23492336
private predicate readCand(Node node1, Content f, Node node2, Configuration config) {
23502337
readDirect(node1, f, node2) and

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,12 +2293,13 @@ private class PathNodeSink extends PathNodeImpl, TPathNodeSink {
22932293
* a callable is recorded by `cc`.
22942294
*/
22952295
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) {
2296-
exists(
2297-
AccessPath ap0, Node midnode, Configuration conf, DataFlowCallable enclosing,
2298-
LocalCallContext localCC
2299-
|
2300-
pathIntoLocalStep(mid, midnode, cc, enclosing, sc, ap0, conf) and
2301-
localCC = getLocalCallContext(cc, enclosing)
2296+
exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC |
2297+
midnode = mid.getNode() and
2298+
conf = mid.getConfiguration() and
2299+
cc = mid.getCallContext() and
2300+
sc = mid.getSummaryCtx() and
2301+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
2302+
ap0 = mid.getAp()
23022303
|
23032304
localFlowBigStep(midnode, node, true, _, conf, localCC) and
23042305
ap = ap0
@@ -2331,20 +2332,6 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt
23312332
pathThroughCallable(mid, node, cc, ap) and sc = mid.getSummaryCtx()
23322333
}
23332334

2334-
pragma[nomagic]
2335-
private predicate pathIntoLocalStep(
2336-
PathNodeMid mid, Node midnode, CallContext cc, DataFlowCallable enclosing, SummaryCtx sc,
2337-
AccessPath ap0, Configuration conf
2338-
) {
2339-
midnode = mid.getNode() and
2340-
cc = mid.getCallContext() and
2341-
conf = mid.getConfiguration() and
2342-
localFlowBigStep(midnode, _, _, _, conf, _) and
2343-
enclosing = midnode.getEnclosingCallable() and
2344-
sc = mid.getSummaryCtx() and
2345-
ap0 = mid.getAp()
2346-
}
2347-
23482335
pragma[nomagic]
23492336
private predicate readCand(Node node1, Content f, Node node2, Configuration config) {
23502337
readDirect(node1, f, node2) and

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImplLocal.qll

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,12 +2293,13 @@ private class PathNodeSink extends PathNodeImpl, TPathNodeSink {
22932293
* a callable is recorded by `cc`.
22942294
*/
22952295
private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCtx sc, AccessPath ap) {
2296-
exists(
2297-
AccessPath ap0, Node midnode, Configuration conf, DataFlowCallable enclosing,
2298-
LocalCallContext localCC
2299-
|
2300-
pathIntoLocalStep(mid, midnode, cc, enclosing, sc, ap0, conf) and
2301-
localCC = getLocalCallContext(cc, enclosing)
2296+
exists(AccessPath ap0, Node midnode, Configuration conf, LocalCallContext localCC |
2297+
midnode = mid.getNode() and
2298+
conf = mid.getConfiguration() and
2299+
cc = mid.getCallContext() and
2300+
sc = mid.getSummaryCtx() and
2301+
localCC = getLocalCallContext(cc, midnode.getEnclosingCallable()) and
2302+
ap0 = mid.getAp()
23022303
|
23032304
localFlowBigStep(midnode, node, true, _, conf, localCC) and
23042305
ap = ap0
@@ -2331,20 +2332,6 @@ private predicate pathStep(PathNodeMid mid, Node node, CallContext cc, SummaryCt
23312332
pathThroughCallable(mid, node, cc, ap) and sc = mid.getSummaryCtx()
23322333
}
23332334

2334-
pragma[nomagic]
2335-
private predicate pathIntoLocalStep(
2336-
PathNodeMid mid, Node midnode, CallContext cc, DataFlowCallable enclosing, SummaryCtx sc,
2337-
AccessPath ap0, Configuration conf
2338-
) {
2339-
midnode = mid.getNode() and
2340-
cc = mid.getCallContext() and
2341-
conf = mid.getConfiguration() and
2342-
localFlowBigStep(midnode, _, _, _, conf, _) and
2343-
enclosing = midnode.getEnclosingCallable() and
2344-
sc = mid.getSummaryCtx() and
2345-
ap0 = mid.getAp()
2346-
}
2347-
23482335
pragma[nomagic]
23492336
private predicate readCand(Node node1, Content f, Node node2, Configuration config) {
23502337
readDirect(node1, f, node2) and

0 commit comments

Comments
 (0)