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 py/examples/backticks
* @name String conversion expressions
* @description Finds `String conversions` expressions (expressions enclosed in backticks), which are removed in Python 3
* @tags backtick

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/builtin-object
* @name Builtin objects
* @description Finds expressions that refer to an object in the builtins module (like int or None).
* @tags reference

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/call
* @name Calls to function
* @description Finds calls to any function named "len"
* @tags call

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/catch-exception
* @name Handle exception of given class
* @description Finds places where we handle MyExceptionClass exceptions
* @tags catch

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/conditional-expression
* @name Conditional expressions
* @description Finds conditional expressions of the form '... if ... else ...'
* where the classes of the sub-expressions differ

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/elif
* @name Elif statement
* @description Finds `elif` sub-statements within `if` statements
* @tags if

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/emptyblock
* @name Empty blocks
* @description Finds the first statement in a block consisting of nothing but Pass statements
* @tags empty

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/emptythen
* @name If statements with empty then branch
* @description Finds 'if' statements where the "then" branch
* consists entirely of Pass statements

View File

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

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/equalitystmt
* @name Equalities as expression statements
* @description Finds `==` equality expressions that form a statement
* @tags comparison

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/extend-class
* @name Class subclasses
* @description Finds classes that subclass MyClass
* @tags class

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/filename
* @name File with given name
* @description Finds files called `spam.py`
* @tags file

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/generator
* @name Generator functions
* @description Finds generator functions
* @tags generator

View File

@@ -1,4 +1,5 @@
/**
* @id py/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 py/examples/method-call
* @name Call to method
* @description Finds calls to MyClass.methodName
* @tags call

View File

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

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/new-instance
* @name Create new object
* @description Finds places where we create a new instanceof `MyClass`
* @tags call

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/override-method
* @name Override of method
* @description Finds methods that overide MyClass.methodName
* @tags method

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/print
* @name Find prints
* @description Find print statements or calls to the builtin function 'print'
* @tags print

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/private-access
* @name Private access
* @description Find accesses to "private" attributes (those starting with an underscore)
* @tags access

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/raise-exception
* @name Raise exception of a class
* @description Finds places where we raise AnException or one of its subclasses
* @tags throw

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/raw-string
* @name Raw string literals
* @description Finds string literals with an 'r' prefix
* @tags string

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/recursion
* @name Recursion
* @description Finds functions that call themselves
* @tags method

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/singlequotestring
* @name Single-quoted string literals
* @description Finds string literals using single quotes
* @tags string

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/store-none
* @name Store None to collection
* @description Finds places where `None` is used as an index when storing to a collection
* @tags None

View File

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

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/too-many-params
* @name Functions with many parameters
* @description Finds functions with more than 7 parameters
* @tags function

View File

@@ -1,4 +1,5 @@
/**
* @id py/examples/tryfinally
* @name Try-finally statements
* @description Finds try-finally statements without an exception handler
* @tags try