Skip to content

Commit 5f0c5e0

Browse files
Copilotdata-douser
andauthored
Fix reviewer comments: correct message pattern spacing in query docs, use extensible predicate wording in integration test READMEs, apply codeql query format to all .ql/.qll files, add *.ql and *.qll to .prettierignore
Agent-Logs-Url: https://github.com/advanced-security/codeql-development-mcp-server/sessions/b3ea9842-0497-431d-86d2-800c5fd46faa Co-authored-by: data-douser <70299490+data-douser@users.noreply.github.com>
1 parent 0448341 commit 5f0c5e0

File tree

8 files changed

+11
-9
lines changed

8 files changed

+11
-9
lines changed

.prettierignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
*.actual
44
*.expected
55
*.log
6+
*.ql
7+
*.qll
68
*.qlref
79
*.testproj/
810
options
@@ -17,6 +19,8 @@ extensions/vscode/test/fixtures/
1719
node_modules
1820
query-results*
1921
server/dist/
22+
server/ql/*/tools/src/*.md
23+
server/ql/*/tools/src/**/*.md
2024
server/ql/*/tools/test/*
2125
workshops/
2226

client/integration-tests/primitives/tools/codeql_query_run/rust_call_graph_from_example1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ The tool should:
5656

5757
## External Predicates Integration
5858

59-
This test demonstrates the integration between the MCP server's sourceFunction parameter and CodeQL's external predicates system. The CallGraphFrom query uses `external string sourceFunction()` to receive the function name, making it work with any Rust code database.
59+
This test demonstrates the integration between the MCP server's sourceFunction parameter and CodeQL's extensible predicates system. The CallGraphFrom query uses `extensible predicate sourceFunction(string name)` to receive the function name via data extensions, making it work with any Rust code database.
6060

6161
## Format Parameter
6262

client/integration-tests/primitives/tools/codeql_query_run/rust_tools_print_ast/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ The tool should:
5555

5656
## External Predicates Integration
5757

58-
This test demonstrates the integration between the MCP server's sourceFiles parameter and CodeQL's external predicates system. The PrintAST query uses `external string selectedSourceFiles()` to receive file paths, making it work with any Rust code database rather than being limited to test directories.
58+
This test demonstrates the integration between the MCP server's sourceFiles parameter and CodeQL's extensible predicates system. The PrintAST query uses `extensible predicate selectedSourceFiles(string path)` to receive file paths via data extensions, making it work with any Rust code database rather than being limited to test directories.
5959

6060
## Format Parameter
6161

server/ql/rust/tools/src/CallGraphFrom/CallGraphFrom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn source_func() { // Source function for analysis
3333
}
3434
```
3535

36-
Running with `sourceFunction = "source_func"` produces results showing each call site with the message pattern ``Call from `source_func`to`helper1```.
36+
Running with `sourceFunction = "source_func"` produces results showing each call site with the message pattern ``Call from `source_func` to `helper1```.
3737

3838
## Output Format
3939

server/ql/rust/tools/src/CallGraphFrom/CallGraphFrom.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ from CallExpr call, Function source
3030
where
3131
call.getEnclosingCallable() = source and
3232
source.getName().getText() = getSourceFunctionName()
33-
select call,
34-
"Call from `" + source.getName().getText() + "` to `" + getCalleeName(call) + "`"
33+
select call, "Call from `" + source.getName().getText() + "` to `" + getCalleeName(call) + "`"

server/ql/rust/tools/src/CallGraphFromTo/CallGraphFromTo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ fn source() {
3333
}
3434
```
3535

36-
Running with `sourceFunction = "source"` and `targetFunction = "target"` produces results showing each call site on the path with the message pattern ``Reachable call from `intermediate`to`target```.
36+
Running with `sourceFunction = "source"` and `targetFunction = "target"` produces results showing each call site on the path with the message pattern ``Reachable call from `intermediate` to `target```.
3737

3838
## Output Format
3939

server/ql/rust/tools/src/CallGraphTo/CallGraphTo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ fn caller2() {
3232
}
3333
```
3434

35-
Running with `targetFunction = "target_func"` produces results showing each call site with the message pattern ``Call to `target_func`from`caller1```.
35+
Running with `targetFunction = "target_func"` produces results showing each call site with the message pattern ``Call to `target_func` from `caller1```.
3636

3737
## Output Format
3838

server/ql/rust/tools/src/CallGraphTo/CallGraphTo.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,4 @@ string getCalleeName(CallExpr call) {
3737

3838
from CallExpr call
3939
where call.getResolvedTarget().(Function).getName().getText() = getTargetFunctionName()
40-
select call,
41-
"Call to `" + getCalleeName(call) + "` from `" + getCallerName(call) + "`"
40+
select call, "Call to `" + getCalleeName(call) + "` from `" + getCallerName(call) + "`"

0 commit comments

Comments
 (0)