mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Add @id to example queries
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/addressof
|
||||
* @name Address of reference variable
|
||||
* @description Finds address-of expressions (`&`) that take the address
|
||||
* of a reference variable
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/arrayaccess
|
||||
* @name Array access
|
||||
* @description Finds array access expressions with an index expression
|
||||
* consisting of a postfix increment (`++`) expression.
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/castexpr
|
||||
* @name Cast expressions
|
||||
* @description Finds casts from a floating point type to an integer type
|
||||
* @tags cast
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/catch-exception
|
||||
* @name Catch exception
|
||||
* @description Finds places where we catch exceptions of type `parse_error`
|
||||
* @tags catch
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/constructor-call
|
||||
* @name Call to constructor
|
||||
* @description Finds places where we call `new MyClass(...)`
|
||||
* @tags call
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/derives-from-class
|
||||
* @name Class derives from
|
||||
* @description Finds classes that derive from `std::exception`
|
||||
* @tags base
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/emptyblock
|
||||
* @name Empty blocks
|
||||
* @description Finds empty block statements
|
||||
* @tags empty
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/emptythen
|
||||
* @name If statements with empty then branch
|
||||
* @description Finds `if` statements where the `then` branch is
|
||||
* an empty block statement
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/eq-true
|
||||
* @name Equality test on boolean
|
||||
* @description Finds tests like `==true`, `!=true`
|
||||
* @tags equal
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/field-access
|
||||
* @name Access of field
|
||||
* @description Finds reads of `aDate` (defined on class `Order`)
|
||||
* @tags access
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/function-call
|
||||
* @name Call to function
|
||||
* @description Finds calls to `std::map<...>::find()`
|
||||
* @tags call
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/integer-literal
|
||||
* @name Integer literal
|
||||
* @description Finds places where we use the integer literal `2`
|
||||
* @tags integer
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/mutualrecursion
|
||||
* @name Mutual recursion
|
||||
* @description Finds pairs of functions that call each other
|
||||
* @tags function
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/override-method
|
||||
* @name Override of method
|
||||
* @description Finds methods that override `std::exception::what()`
|
||||
* @tags function
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/returnstatement
|
||||
* @name Return statements
|
||||
* @description Finds return statements that return `0`
|
||||
* @tags return
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/singletonblock
|
||||
* @name Singleton blocks
|
||||
* @description Finds block statements containing a single statement
|
||||
* @tags block
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/switchcase
|
||||
* @name Switch statement case missing
|
||||
* @description Finds switch statements with a missing enum constant case
|
||||
* and no default case
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/ternaryconditional
|
||||
* @name Conditional expressions
|
||||
* @description Finds conditional expressions of the form `... ? ... : ...`
|
||||
* where the types of the resulting expressions differ
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/throw-exception
|
||||
* @name Throw exception of type
|
||||
* @description Finds places where we throw `parse_error` or one of its sub-types
|
||||
* @tags base
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/todocomment
|
||||
* @name TODO comments
|
||||
* @description Finds comments containing the word "TODO"
|
||||
* @tags comment
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/toomanyparams
|
||||
* @name Functions with many parameters
|
||||
* @description Finds functions or methods with more than 10 parameters
|
||||
* @tags function
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/unusedlocalvar
|
||||
* @name Unused local variable
|
||||
* @description Finds local variables that are not accessed
|
||||
* @tags variable
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/unusedmethod
|
||||
* @name Unused private method
|
||||
* @description Finds private non-virtual methods that are not accessed
|
||||
* @tags method
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/unusedparam
|
||||
* @name Unused parameter
|
||||
* @description Finds parameters that are not accessed
|
||||
* @tags parameter
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/voidreturntype
|
||||
* @name Const method without return type
|
||||
* @description Finds const methods whose return type is `void`
|
||||
* @tags const
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
/**
|
||||
* @id cpp/examples/volatilevariable
|
||||
* @name Variable declared volatile
|
||||
* @description Finds variables with a `volatile` modifier
|
||||
* @tags variable
|
||||
|
||||
Reference in New Issue
Block a user