Add @id to example queries

This commit is contained in:
Arthur Baars
2019-07-25 15:43:39 +02:00
parent bdce7d07c1
commit ccde7cf6cf
142 changed files with 142 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/arrayaccess
* @name Array access
* @description Finds array access expressions with an index expression
* consisting of a unary assignment

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/castexpr
* @name Cast expressions
* @description Finds casts from a floating point type to an integer type
* @tags cast

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/catch-exception
* @name Catch exception
* @description Finds places where we catch exceptions of type com.example.AnException
* @tags catch

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/constructor-call
* @name Call to constructor
* @description Finds places where we call `new com.example.Class(...)`
* @tags call

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/emptyblock
* @name Empty blocks
* @description Finds empty block statements
* @tags empty

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/emptythen
* @name If statements with empty then branch
* @description Finds 'if' statements where the 'then' branch is
* an empty block statement

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/eq-true
* @name Equality test on boolean
* @description Finds tests like `==true`, `==false`, `!=true`, `!=false`
* @tags equals

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/extend-class
* @name Class extends/implements
* @description Finds classes/interfaces that extend/implement com.example.Class
* @tags class

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/field-read
* @name Read of field
* @description Finds reads of aField (defined on com.example.Class)
* @tags field

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/integer-literal
* @name Integer literal
* @description Finds places where we use the integer literal `0`
* @tags integer

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/method-call
* @name Call to method
* @description Finds calls to com.example.Class.methodName
* @tags call

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/mutualrecursion
* @name Mutual recursion
* @description Finds pairs of methods that call each other
* @tags method

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/nativemethod
* @name Native methods
* @description Finds methods that are native
* @tags method

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/null-argument
* @name Add null to collection
* @description Finds places where we add null to a collection
* @tags null

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/override-method
* @name Override of method
* @description Finds methods that override com.example.Class.baseMethod
* @tags method

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/qualifiedthis
* @name Qualified 'this' access
* @description Finds 'this' accesses that are qualified by a type name
* @tags this

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/returnstatement
* @name Return statements
* @description Finds return statements that return 'null'
* @tags return

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/singletonblock
* @name Singleton blocks
* @description Finds block statements containing a single statement
* @tags block

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/switchcase
* @name Switch statement case missing
* @description Finds switch statements with a missing enum constant case and no default case
* @tags switch

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/synchronizedmethod
* @name Synchronized methods
* @description Finds methods that are synchronized
* @tags method

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/ternaryconditional
* @name Conditional expressions
* @description Finds conditional expressions of the form '... ? ... : ...'
* where the types of the resulting expressions differ

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/throw-exception
* @name Throw exception of type
* @description Finds places where we throw com.example.AnException or one of its subtypes
* @tags throw

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/todocomment
* @name TODO comments
* @description Finds comments containing the word "TODO"
* @tags comment

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/toomanyparams
* @name Methods with many parameters
* @description Finds methods with more than ten parameters
* @tags method

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/tryfinally
* @name Try-finally statements
* @description Finds try-finally statements without a catch clause
* @tags try

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/unusedlocalvar
* @name Unused local variable
* @description Finds local variables that are not accessed
* @tags variable

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/unusedmethod
* @name Unused private method
* @description Finds private methods that are not accessed
* @tags method

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/unusedparam
* @name Unused parameter
* @description Finds parameters that are not accessed
* @tags parameter

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/voidreturntype
* @name Methods without return type
* @description Finds methods whose return type is 'void'
* @tags method

View File

@@ -1,4 +1,5 @@
/**
* @id java/examples/volatilefield
* @name Fields declared volatile
* @description Finds fields with a 'volatile' modifier
* @tags field