Merge pull request #822 from geoffw0/query-tags-4

CPP: Query tags 4
This commit is contained in:
Jonas Jensen
2019-01-25 17:08:56 +01:00
committed by GitHub
93 changed files with 168 additions and 16 deletions

View File

@@ -7,6 +7,7 @@
* @workingset jhotdraw
* @result succeed 48
* @result_ondemand succeed 48
* @tags maintainability
*/
import cpp

View File

@@ -5,6 +5,7 @@
* @kind treemap
* @id cpp/architecture/hub-classes
* @treemap.warnOn highValues
* @tags maintainability
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @workingset jhotdraw
* @result succeed 48
* @result_ondemand succeed 48
* @tags maintainability
*/
import cpp

View File

@@ -5,6 +5,7 @@
* @id cpp/architecture/cyclic-namespaces
* @graph.layout hierarchical
* @tags maintainability
* modularity
*/
import cpp

View File

@@ -3,6 +3,8 @@
* @description Finds classes that belong to no namespace.
* @kind table
* @id cpp/architecture/global-namespace-classes
* @tags maintainability
* modularity
*/
import cpp

View File

@@ -4,6 +4,8 @@
* @kind graph
* @id cpp/architecture/namespace-dependencies
* @graph.layout hierarchical
* @tags maintainability
* modularity
*/
import cpp

View File

@@ -3,6 +3,7 @@
* @description Shows general statistics about the application.
* @kind table
* @id cpp/architecture/general-statistics
* @tags maintainability
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @treemap.warnOn highValues
* @metricType reftype
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType reftype
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType reftype
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType reftype
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType reftype
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType reftype
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType reftype
* @metricAggregate avg max
* @tags modularity
*/
import cpp

View File

@@ -8,6 +8,7 @@
* @treemap.warnOn highValues
* @metricType reftype
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @metricType externalDependency
* @precision medium
* @id cpp/external-dependencies
* @tags modularity
*/
import ExternalDependencies

View File

@@ -3,6 +3,7 @@
* @kind source-link
* @metricType externalDependency
* @id cpp/dependency-source-links
* @tags modularity
*/
import ExternalDependencies

View File

@@ -8,6 +8,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate sum
* @tags maintainability
*/
import cpp

View File

@@ -7,6 +7,8 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg max
* @tags maintainability
* readability
*/
import cpp

View File

@@ -8,6 +8,8 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
* readability
*/
import cpp
import semmle.code.cpp.headers.MultipleInclusion

View File

@@ -7,6 +7,8 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg max
* @tags maintainability
* modularity
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -8,9 +8,9 @@
* @metricType file
* @metricAggregate avg sum max
* @precision high
* @id cpp/duplicated-lines-in-files
* @tags testability
* modularity
* @id cpp/duplicated-lines-in-files
*/
import external.CodeDuplication

View File

@@ -7,6 +7,8 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg max
* @tags maintainability
* readability
*/
import cpp

View File

@@ -6,6 +6,8 @@
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
* @tags maintainability
* modularity
*/
import cpp

View File

@@ -7,6 +7,8 @@
* @id cpp/time-in-frontend-per-file
* @metricType fileCompilation
* @metricAggregate avg sum max
* @tags maintainability
* testability
*/
import cpp

View File

@@ -9,6 +9,8 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg max
* @tags maintainability
* modularity
*/
import cpp

View File

@@ -11,6 +11,8 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg max
* @tags maintainability
* modularity
*/
import cpp

View File

@@ -6,6 +6,8 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg max
* @tags maintainability
* readability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags maintainability
*/
import cpp

View File

@@ -6,6 +6,8 @@
* @treemap.warnOn highValues
* @metricType callable
* @metricAggregate avg max
* @tags maintainability
* complexity
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags external-data
* @deprecated
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags external-data
* @deprecated
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg sum max
* @tags external-data
* @deprecated
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg min max
* @tags external-data
* @deprecated
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg min max sum
* @tags external-data
* @deprecated
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg min max
* @tags external-data
* @deprecated
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg min max
* @tags external-data
* @deprecated
*/
import cpp

View File

@@ -7,6 +7,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg min max
* @tags external-data
* @deprecated
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg min max sum
* @tags external-data
* @deprecated
*/
import cpp

View File

@@ -6,6 +6,7 @@
* @treemap.warnOn highValues
* @metricType file
* @metricAggregate avg min max sum
* @tags external-data
* @deprecated
*/
import cpp

View File

@@ -4,6 +4,7 @@
* @kind chart
* @id cpp/abstract-namespaces
* @chart.type bar
* @tags maintainability
*/
import cpp

View File

@@ -3,6 +3,7 @@
* @description Finds namespaces that have an abstractness equal to 0.
* @kind tree
* @id cpp/concrete-namespaces
* @tags maintainability
*/
import cpp

View File

@@ -5,6 +5,7 @@
* @kind chart
* @id cpp/high-afferent-coupling-namespaces
* @chart.type bar
* @tags maintainability
*/
import cpp

View File

@@ -5,6 +5,7 @@
* @kind chart
* @id cpp/high-distance-from-main-line-namespaces
* @chart.type bar
* @tags maintainability
*/
import cpp

View File

@@ -4,6 +4,8 @@
* @kind chart
* @id cpp/high-efferent-coupling-namespaces
* @chart.type bar
* @tags maintainability
* modularity
*/
import cpp

View File

@@ -4,6 +4,7 @@
* @kind chart
* @id cpp/stable-namespaces
* @chart.type bar
* @tags maintainability
*/
import cpp

View File

@@ -4,6 +4,7 @@
* @kind chart
* @id cpp/unstable-namespaces
* @chart.type bar
* @tags maintainability
*/
import cpp

View File

@@ -5,6 +5,8 @@
* @id cpp/power-of-10/use-of-goto
* @problem.severity warning
* @tags maintainability
* readability
* external/powerof10
*/
import cpp

View File

@@ -4,6 +4,10 @@
* @kind problem
* @id cpp/power-of-10/use-of-jmp
* @problem.severity warning
* @tags correctness
* portability
* readability
* external/powerof10
*/
import cpp

View File

@@ -5,6 +5,9 @@
* @kind problem
* @id cpp/power-of-10/use-of-recursion
* @problem.severity warning
* @tags maintainability
* readability
* external/powerof10
*/
import cpp

View File

@@ -4,7 +4,11 @@
This check excludes loops that are meant to be nonterminating (like schedulers).
* @kind problem
* @id cpp/power-of-10/bounded-loop-iterations
* @problem.severity warning
* @problem.severity recommendation
* @precision low
* @tags correctness
* reliability
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description Permanent loops (like "while(1) {..}") are typically meant to be non-terminating and should not be terminated by other means.
* @kind problem
* @id cpp/power-of-10/exit-permanent-loop
* @problem.severity warning
* @problem.severity recommendation
* @precision low
* @tags correctness
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,9 @@
* @description Dynamic memory allocation (using malloc() or calloc()) should be confined to the initialization routines of a program.
* @kind problem
* @id cpp/power-of-10/dynamic-alloc-after-init
* @problem.severity warning
* @problem.severity recommendation
* @tags resources
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description Function length should be limited to what can be printed on a single sheet of paper (60 logical lines).
* @kind problem
* @id cpp/power-of-10/function-too-long
* @problem.severity warning
* @problem.severity recommendation
* @tags maintainability
* readability
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description Putting more than one statement on a single line hinders program understanding.
* @kind problem
* @id cpp/power-of-10/one-stmt-per-line
* @problem.severity warning
* @problem.severity recommendation
* @tags maintainability
* readability
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description Each function over 20 logical lines should have at least two assertions.
* @kind problem
* @id cpp/power-of-10/assertion-density
* @problem.severity warning
* @problem.severity recommendation
* @tags maintainability
* reliability
* external/powerof10
*/
import semmle.code.cpp.commons.Assertions

View File

@@ -5,6 +5,8 @@
* @kind problem
* @id cpp/power-of-10/assertion-side-effect
* @problem.severity warning
* @tags correctness
* external/powerof10
*/
import semmle.code.cpp.commons.Assertions

View File

@@ -4,6 +4,9 @@
* @kind problem
* @id cpp/power-of-10/constant-assertion
* @problem.severity warning
* @tags maintainability
* reliability
* external/powerof10
*/
import semmle.code.cpp.commons.Assertions

View File

@@ -4,6 +4,8 @@
* @kind problem
* @id cpp/power-of-10/non-boolean-assertion
* @problem.severity warning
* @tags correctness
* external/powerof10
*/
import semmle.code.cpp.commons.Assertions

View File

@@ -3,7 +3,11 @@
* @description Global variables that are not accessed outside their own file could be made static to promote information hiding.
* @kind problem
* @id cpp/power-of-10/global-could-be-static
* @problem.severity warning
* @problem.severity recommendation
* @precision low
* @tags maintainability
* modularity
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description Global and file-scope variables that are accessed by only one function should be scoped within that function.
* @kind problem
* @id cpp/power-of-10/variable-scope-too-large
* @problem.severity warning
* @problem.severity recommendation
* @precision low
* @tags maintainability
* external/powerof10
*/
import cpp

View File

@@ -4,6 +4,9 @@
* @kind problem
* @id cpp/power-of-10/check-arguments
* @problem.severity warning
+ * @tags correctness
+ * reliability
* external/powerof10
*/
import cpp

View File

@@ -4,6 +4,9 @@
* @kind problem
* @id cpp/power-of-10/check-return-values
* @problem.severity warning
* @tags correctness
* reliability
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description The use of conditional compilation directives must be kept to a minimum -- e.g. for header guards only.
* @kind problem
* @id cpp/power-of-10/avoid-conditional-compilation
* @problem.severity warning
* @problem.severity recommendation
* @tags maintainability
* readability
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description Macros must expand to complete syntactic units -- "#define MY_IF if(" is not legal.
* @kind problem
* @id cpp/power-of-10/partial-macro
* @problem.severity warning
* @problem.severity recommendation
* @tags maintainability
* readability
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description The use of the preprocessor must be limited to inclusion of header files and simple macro definitions.
* @kind problem
* @id cpp/power-of-10/restrict-preprocessor
* @problem.severity warning
* @problem.severity recommendation
* @tags maintainability
* readability
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description Macros are not allowed to use complex preprocessor features like variable argument lists and token pasting.
* @kind problem
* @id cpp/power-of-10/undisciplined-macro
* @problem.severity warning
* @problem.severity recommendation
* @tags maintainability
* readability
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description Function pointers are not permitted -- they make it impossible for a tool to prove the absence of recursion.
* @kind problem
* @id cpp/power-of-10/function-pointer
* @problem.severity warning
* @problem.severity recommendation
* @tags maintainability
* testability
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description Pointer indirection may not be hidden by typedefs -- "typedef int* IntPtr;" is not allowed.
* @kind problem
* @id cpp/power-of-10/hidden-pointer-indirection
* @problem.severity warning
* @problem.severity recommendation
* @tags maintainability
* readability
* external/powerof10
*/
import cpp

View File

@@ -3,7 +3,10 @@
* @description No more than one level of pointer nesting/dereferencing should be used.
* @kind problem
* @id cpp/power-of-10/pointer-nesting
* @problem.severity warning
* @problem.severity recommendation
* @tags maintainability
* readability
* external/powerof10
*/
import cpp

View File

@@ -3,6 +3,7 @@
* @description This filter demonstrates how to change the value
* computed by the metric that it is filtering. In this
* example the value is increased by 10.
* @tags filter
*/
import cpp
import external.MetricFilter

View File

@@ -4,6 +4,7 @@
* generated by the query that it is filtering. In this
* example the string `Filtered query result: ` is
* prepended to the message.
* @tags filter
*/
import cpp
import external.DefectFilter

View File

@@ -4,6 +4,7 @@
* they meet certain criteria. In this example, results are
* only returned if they do not come from a file which
* contains 'generated' anywhere in its path.
* @tags filter
*/
import cpp
import external.DefectFilter

View File

@@ -1,6 +1,7 @@
/**
* @name Defect filter
* @description Only include results in large files (200) lines of code, and change the message.
* @tags filter
*/
import cpp
import external.DefectFilter

View File

@@ -3,6 +3,7 @@
* @description Insert description here...
* @kind problem
* @problem.severity warning
* @tags external-data
*/
import cpp

View File

@@ -3,6 +3,7 @@
* @description A test case for creating a defect from SVN data.
* @kind problem
* @problem.severity warning
* @tags external-data
* @deprecated
*/

View File

@@ -1,6 +1,7 @@
/**
* @name Metric filter
* @description Only include results in large files (200) lines of code.
* @tags filter
*/
import cpp
import external.MetricFilter

View File

@@ -3,6 +3,7 @@
* @description Find number of commits for a file
* @treemap.warnOn lowValues
* @metricType file
* @tags external-data
* @deprecated
*/

View File

@@ -4,6 +4,7 @@
* located in files that are maintained manually.
* @kind problem
* @id cpp/autogenerated-filter
* @tags filter
*/
import cpp

View File

@@ -4,6 +4,7 @@
* located in files that are maintained manually.
* @kind treemap
* @id cpp/autogenerated-for-metric-filter
* @tags filter
*/
import cpp

View File

@@ -5,6 +5,7 @@
* located in files for which we have source code.
* @kind problem
* @id cpp/from-source-filter
* @tags filter
*/
import cpp

View File

@@ -5,6 +5,7 @@
* the result's location.
* @kind problem
* @id cpp/macros-filter
* @tags filter
*/
import cpp
import external.DefectFilter

View File

@@ -6,6 +6,8 @@
* before the date of the snapshot.
* @kind problem
* @id cpp/recent-defects-filter
* @tags filter
* external-data
* @deprecated
*/
import cpp

View File

@@ -6,6 +6,8 @@
* before the snapshot.
* @kind treemap
* @id cpp/recent-defects-for-metric-filter
* @tags filter
* external-data
* @deprecated
*/
import cpp