Skip to content

Commit 1025400

Browse files
committed
Shared: remove documentation prone to falling out of date
1 parent 2ca45ef commit 1025400

File tree

4 files changed

+30
-18
lines changed

4 files changed

+30
-18
lines changed

javascript/ql/lib/semmle/javascript/frameworks/data/ModelsAsData.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
88
* The package name refers to an NPM package name or a path within a package name such as `lodash/extend`.
99
* The string `global` refers to the global object (whether it came from the `global` package or not).
1010
*
11-
* The following tokens have a language-specific interpretation:
12-
* - `Instance`: the value returned by a `new`-call to a function
13-
* - `Awaited`: the value from a resolved promise
14-
*
1511
* A `(package, type)` tuple may refer to the exported type named `type` from the NPM package `package`.
1612
* For example, `(express, Request)` would match a parameter below due to the type annotation:
1713
* ```ts

javascript/ql/lib/semmle/javascript/frameworks/data/internal/ApiGraphModels.qll

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,26 @@
2222
* or the empty string if referring to the package itself.
2323
* It can also be a synthetic type name defined by a type definition (see type definitions below).
2424
* 3. The `path` column is a `.`-separated list of "access path tokens" to resolve, starting at the node selected by `package` and `type`.
25-
* The possible access path tokens are:
26-
* - Member[x] : a property named `x`. May be a comma-separated list of named.
25+
*
26+
* Every language supports the following tokens:
2727
* - Argument[n]: the n-th argument to a call. May be a range of form `x..y` (inclusive) and/or a comma-separated list.
2828
* Additionally, `N-1` refers to the last argument, `N-2` refers to the second-last, and so on.
2929
* - Parameter[n]: the n-th parameter of a callback. May be a range of form `x..y` (inclusive) and/or a comma-separated list.
3030
* - ReturnValue: the value returned by a function call
31-
* - Instance: the value returned by a constructor call
32-
* - Awaited: the value from a resolved promise/future-like object
3331
* - WithArity[n]: match a call with the given arity. May be a range of form `x..y` (inclusive) and/or a comma-separated list.
34-
* - Other language-specific tokens mentioned in `ModelsAsData.qll`.
32+
*
33+
* The following tokens are common and should be implemented for languages where it makes sense:
34+
* - Member[x]: a member named `x`; exactly what a "member" is depends on the language. May be a comma-separated list of names.
35+
* - Instance: an instance of a class
36+
* - Subclass: a subclass of a class
37+
* - ArrayElement: an element of array
38+
* - Element: an element of a collection-like object
39+
* - MapKey: a key in map-like object
40+
* - MapValue: a value in a map-like object
41+
* - Awaited: the value from a resolved promise/future-like object
42+
*
43+
* For the time being, please consult `ApiGraphModelsSpecific.qll` to see which language-specific tokens are currently supported.
44+
*
3545
* 4. The `input` and `output` columns specify how data enters and leaves the element selected by the
3646
* first `(package, type, path)` tuple. Both strings are `.`-separated access paths
3747
* of the same syntax as the `path` column.

ruby/ql/lib/codeql/ruby/frameworks/data/ModelsAsData.qll

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
* - the empty string, referring to the global scope,
1313
* - the string `any`, referring to any expression, or
1414
* - the name of a type definition from `ModelInput::TypeModelCsv`
15-
*
16-
* The `path` part is a dot-separated access path with the following language-specific tokens:
17-
* - `Method[x]`: a call to a method named `x`.
18-
* - `Instance`: an instance of a class, currently an alias for `Method[new].ReturnValue`.
1915
*/
2016

2117
private import ruby

ruby/ql/lib/codeql/ruby/frameworks/data/internal/ApiGraphModels.qll

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,26 @@
2222
* or the empty string if referring to the package itself.
2323
* It can also be a synthetic type name defined by a type definition (see type definitions below).
2424
* 3. The `path` column is a `.`-separated list of "access path tokens" to resolve, starting at the node selected by `package` and `type`.
25-
* The possible access path tokens are:
26-
* - Member[x] : a property named `x`. May be a comma-separated list of named.
25+
*
26+
* Every language supports the following tokens:
2727
* - Argument[n]: the n-th argument to a call. May be a range of form `x..y` (inclusive) and/or a comma-separated list.
2828
* Additionally, `N-1` refers to the last argument, `N-2` refers to the second-last, and so on.
2929
* - Parameter[n]: the n-th parameter of a callback. May be a range of form `x..y` (inclusive) and/or a comma-separated list.
3030
* - ReturnValue: the value returned by a function call
31-
* - Instance: the value returned by a constructor call
32-
* - Awaited: the value from a resolved promise/future-like object
3331
* - WithArity[n]: match a call with the given arity. May be a range of form `x..y` (inclusive) and/or a comma-separated list.
34-
* - Other language-specific tokens mentioned in `ModelsAsData.qll`.
32+
*
33+
* The following tokens are common and should be implemented for languages where it makes sense:
34+
* - Member[x]: a member named `x`; exactly what a "member" is depends on the language. May be a comma-separated list of names.
35+
* - Instance: an instance of a class
36+
* - Subclass: a subclass of a class
37+
* - ArrayElement: an element of array
38+
* - Element: an element of a collection-like object
39+
* - MapKey: a key in map-like object
40+
* - MapValue: a value in a map-like object
41+
* - Awaited: the value from a resolved promise/future-like object
42+
*
43+
* For the time being, please consult `ApiGraphModelsSpecific.qll` to see which language-specific tokens are currently supported.
44+
*
3545
* 4. The `input` and `output` columns specify how data enters and leaves the element selected by the
3646
* first `(package, type, path)` tuple. Both strings are `.`-separated access paths
3747
* of the same syntax as the `path` column.

0 commit comments

Comments
 (0)