Skip to content

Commit da2779d

Browse files
authored
[UPDATE PRIMITIVE] Fix CallGraph docs: remove IDE integration claim, fix output format, fix NON_COMPLIANT typo (#83)
1 parent a922b54 commit da2779d

File tree

17 files changed

+33
-49
lines changed

17 files changed

+33
-49
lines changed

.github/instructions/server_ql_languages_tools.instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Each language directory follows a standardized structure that enables automatic
2727
- ALWAYS create `.qlref` files that reference the correct query path relative to the tools directory.
2828
- ALWAYS create `.expected` files with the expected output for each test case.
2929
- ALWAYS implement test code source files that test both the query's ability to ignore `COMPLIANT` code patterns AND to detect `NON_COMPLIANT` code patterns for detection-style queries (`@kind problem` / `@kind path-problem`).
30-
- ALWAYS comment test cases as either `COMPLIANT` (i.e. query should not match) or `NON-COMPLIANT` (i.e. query should match) for detection-style queries.
30+
- ALWAYS comment test cases as either `COMPLIANT` (i.e. query should not match) or `NON_COMPLIANT` (i.e. query should match) for detection-style queries.
3131
- ALWAYS omit `COMPLIANT` and `NON_COMPLIANT` annotations from `@kind graph` query documentation and test code, because these queries produce structural output (ASTs, CFGs, call graphs) rather than detecting problems.
3232
- ALWAYS use the `server/scripts/install-packs.sh` script to install dependencies for CodeQL packs defined under the `server/ql/*/language/tools/` directories.
3333
- ALWAYS use explicit version numbers in `codeql-pack.yml` files; never use wildcards (`*`).

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This query is primarily used for:
1515
- Mapping outbound dependencies of a specific function
1616
- Understanding what a function calls and in what order
1717
- Analyzing call chains for refactoring or security review
18-
- IDE integration for call hierarchy navigation
1918

2019
## Example
2120

@@ -31,13 +30,13 @@ void sourceFunc() { // Source function for analysis
3130
}
3231
```
3332

34-
Running with `sourceFunction = "sourceFunc"` produces results showing each call site with the message pattern `Call from 'sourceFunc' to 'helper1'`.
33+
Running with `sourceFunction = "sourceFunc"` produces results showing each call site with the message pattern ``Call from `sourceFunc` to `helper1``.
3534

3635
## Output Format
3736

3837
The query is a `@kind problem` query producing rows of:
3938

40-
- `select call, "Call from 'source' to 'callee'"`
39+
- ``select call, "Call from `source` to `callee`"``
4140

4241
## References
4342

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This query is primarily used for:
1515
- Finding all callers of a specific function
1616
- Impact analysis before modifying a function signature
1717
- Understanding usage patterns and entry points
18-
- IDE integration for call hierarchy navigation
1918

2019
## Example
2120

@@ -28,13 +27,13 @@ void caller1() { targetFunc(); }
2827
void caller2() { targetFunc(); }
2928
```
3029
31-
Running with `targetFunction = "targetFunc"` produces results showing each call site with the message pattern `Call to 'targetFunc' from 'caller1'`.
30+
Running with `targetFunction = "targetFunc"` produces results showing each call site with the message pattern ``Call to `targetFunc` from `caller1``.
3231
3332
## Output Format
3433
3534
The query is a `@kind problem` query producing rows of:
3635
37-
- `select call, "Call to 'target' from 'caller'"`
36+
- ``select call, "Call to `target` from `caller`"``
3837
3938
## References
4039

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This query is primarily used for:
1515
- Mapping outbound dependencies of a specific method
1616
- Understanding what a method calls and in what order
1717
- Analyzing call chains for refactoring or security review
18-
- IDE integration for call hierarchy navigation
1918

2019
## Example
2120

@@ -31,13 +30,13 @@ void SourceMethod() { // Source method for analysis
3130
}
3231
```
3332

34-
Running with `sourceFunction = "SourceMethod"` produces results showing each call site with the message pattern `Call from 'SourceMethod' to 'Helper1'`.
33+
Running with `sourceFunction = "SourceMethod"` produces results showing each call site with the message pattern ``Call from `SourceMethod` to `Helper1``.
3534

3635
## Output Format
3736

3837
The query is a `@kind problem` query producing rows of:
3938

40-
- `select call, "Call from 'source' to 'callee'"`
39+
- ``select call, "Call from `source` to `callee`"``
4140

4241
## References
4342

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This query is primarily used for:
1515
- Finding all callers of a specific method
1616
- Impact analysis before modifying a method signature
1717
- Understanding usage patterns and entry points
18-
- IDE integration for call hierarchy navigation
1918

2019
## Example
2120

@@ -28,13 +27,13 @@ void Caller1() { TargetMethod(); }
2827
void Caller2() { TargetMethod(); }
2928
```
3029

31-
Running with `targetFunction = "TargetMethod"` produces results showing each call site with the message pattern `Call to 'TargetMethod' from 'Caller1'`.
30+
Running with `targetFunction = "TargetMethod"` produces results showing each call site with the message pattern ``Call to `TargetMethod` from `Caller1``.
3231

3332
## Output Format
3433

3534
The query is a `@kind problem` query producing rows of:
3635

37-
- `select call, "Call to 'target' from 'caller'"`
36+
- ``select call, "Call to `target` from `caller`"``
3837

3938
## References
4039

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This query is primarily used for:
1515
- Mapping outbound dependencies of a specific function
1616
- Understanding what a function calls and in what order
1717
- Analyzing call chains for refactoring or security review
18-
- IDE integration for call hierarchy navigation
1918

2019
## Example
2120

@@ -31,13 +30,13 @@ func sourceFunc() { // Source function for analysis
3130
}
3231
```
3332

34-
Running with `sourceFunction = "sourceFunc"` produces results showing each call site with the message pattern `Call from 'sourceFunc' to 'helper1'`.
33+
Running with `sourceFunction = "sourceFunc"` produces results showing each call site with the message pattern ``Call from `sourceFunc` to `helper1``.
3534

3635
## Output Format
3736

3837
The query is a `@kind problem` query producing rows of:
3938

40-
- `select call, "Call from 'source' to 'callee'"`
39+
- ``select call, "Call from `source` to `callee`"``
4140

4241
## References
4342

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This query is primarily used for:
1515
- Finding all callers of a specific function
1616
- Impact analysis before modifying a function signature
1717
- Understanding usage patterns and entry points
18-
- IDE integration for call hierarchy navigation
1918

2019
## Example
2120

@@ -28,13 +27,13 @@ func caller1() { targetFunc() }
2827
func caller2() { targetFunc() }
2928
```
3029

31-
Running with `targetFunction = "targetFunc"` produces results showing each call site with the message pattern `Call to 'targetFunc' from 'caller1'`.
30+
Running with `targetFunction = "targetFunc"` produces results showing each call site with the message pattern ``Call to `targetFunc` from `caller1``.
3231

3332
## Output Format
3433

3534
The query is a `@kind problem` query producing rows of:
3635

37-
- `select call, "Call to 'target' from 'caller'"`
36+
- ``select call, "Call to `target` from `caller`"``
3837

3938
## References
4039

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This query is primarily used for:
1515
- Mapping outbound dependencies of a specific method
1616
- Understanding what a method calls and in what order
1717
- Analyzing call chains for refactoring or security review
18-
- IDE integration for call hierarchy navigation
1918

2019
## Example
2120

@@ -31,13 +30,13 @@ void sourceMethod() { // Source method for analysis
3130
}
3231
```
3332

34-
Running with `sourceFunction = "sourceMethod"` produces results showing each call site with the message pattern `Call from 'sourceMethod' to 'helper1'`.
33+
Running with `sourceFunction = "sourceMethod"` produces results showing each call site with the message pattern ``Call from `sourceMethod` to `helper1``.
3534

3635
## Output Format
3736

3837
The query is a `@kind problem` query producing rows of:
3938

40-
- `select call, "Call from 'source' to 'callee'"`
39+
- ``select call, "Call from `source` to `callee`"``
4140

4241
## References
4342

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This query is primarily used for:
1515
- Finding all callers of a specific method
1616
- Impact analysis before modifying a method signature
1717
- Understanding usage patterns and entry points
18-
- IDE integration for call hierarchy navigation
1918

2019
## Example
2120

@@ -28,13 +27,13 @@ void caller1() { targetMethod(); }
2827
void caller2() { targetMethod(); }
2928
```
3029

31-
Running with `targetFunction = "targetMethod"` produces results showing each call site with the message pattern `Call to 'targetMethod' from 'caller1'`.
30+
Running with `targetFunction = "targetMethod"` produces results showing each call site with the message pattern ``Call to `targetMethod` from `caller1``.
3231

3332
## Output Format
3433

3534
The query is a `@kind problem` query producing rows of:
3635

37-
- `select call, "Call to 'target' from 'caller'"`
36+
- ``select call, "Call to `target` from `caller`"``
3837

3938
## References
4039

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ This query is primarily used for:
1515
- Mapping outbound dependencies of a specific function
1616
- Understanding what a function calls and in what order
1717
- Analyzing call chains for refactoring or security review
18-
- IDE integration for call hierarchy navigation
1918

2019
## Example
2120

@@ -34,13 +33,13 @@ function sourceFunc() {
3433
}
3534
```
3635

37-
Running with `sourceFunction = "sourceFunc"` produces results showing each call site with the message pattern `Call from 'sourceFunc' to 'helper1'`.
36+
Running with `sourceFunction = "sourceFunc"` produces results showing each call site with the message pattern ``Call from `sourceFunc` to `helper1``.
3837

3938
## Output Format
4039

4140
The query is a `@kind problem` query producing rows of:
4241

43-
- `select call, "Call from 'source' to 'callee'"`
42+
- ``select call, "Call from `source` to `callee`"``
4443

4544
## References
4645

0 commit comments

Comments
 (0)