Skip to content

Commit ccde7cf

Browse files
committed
Add @id to example queries
1 parent bdce7d0 commit ccde7cf

File tree

142 files changed

+142
-0
lines changed

Some content is hidden

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

142 files changed

+142
-0
lines changed

cpp/ql/examples/snippets/addressof.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @id cpp/examples/addressof
23
* @name Address of reference variable
34
* @description Finds address-of expressions (`&`) that take the address
45
* of a reference variable

cpp/ql/examples/snippets/arrayaccess.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @id cpp/examples/arrayaccess
23
* @name Array access
34
* @description Finds array access expressions with an index expression
45
* consisting of a postfix increment (`++`) expression.

cpp/ql/examples/snippets/castexpr.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @id cpp/examples/castexpr
23
* @name Cast expressions
34
* @description Finds casts from a floating point type to an integer type
45
* @tags cast

cpp/ql/examples/snippets/catch_exception.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @id cpp/examples/catch-exception
23
* @name Catch exception
34
* @description Finds places where we catch exceptions of type `parse_error`
45
* @tags catch

cpp/ql/examples/snippets/constructor_call.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @id cpp/examples/constructor-call
23
* @name Call to constructor
34
* @description Finds places where we call `new MyClass(...)`
45
* @tags call

cpp/ql/examples/snippets/derives_from_class.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @id cpp/examples/derives-from-class
23
* @name Class derives from
34
* @description Finds classes that derive from `std::exception`
45
* @tags base

cpp/ql/examples/snippets/emptyblock.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @id cpp/examples/emptyblock
23
* @name Empty blocks
34
* @description Finds empty block statements
45
* @tags empty

cpp/ql/examples/snippets/emptythen.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @id cpp/examples/emptythen
23
* @name If statements with empty then branch
34
* @description Finds `if` statements where the `then` branch is
45
* an empty block statement

cpp/ql/examples/snippets/eq_true.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @id cpp/examples/eq-true
23
* @name Equality test on boolean
34
* @description Finds tests like `==true`, `!=true`
45
* @tags equal

cpp/ql/examples/snippets/field_access.ql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/**
2+
* @id cpp/examples/field-access
23
* @name Access of field
34
* @description Finds reads of `aDate` (defined on class `Order`)
45
* @tags access

0 commit comments

Comments
 (0)