diff --git a/cpp/ql/src/Architecture/General Class-Level Information/ClassHierarchies.qhelp b/cpp/ql/src/Architecture/General Class-Level Information/ClassHierarchies.qhelp deleted file mode 100644 index 423adb9f47a..00000000000 --- a/cpp/ql/src/Architecture/General Class-Level Information/ClassHierarchies.qhelp +++ /dev/null @@ -1,24 +0,0 @@ - - - - - -

This query shows graph of class inheritance hierarchy

- -

- - -

-

- - - - - -

- - - -
diff --git a/cpp/ql/src/Architecture/General Class-Level Information/ClassHierarchies.ql b/cpp/ql/src/Architecture/General Class-Level Information/ClassHierarchies.ql index 3f783276c19..04753567560 100644 --- a/cpp/ql/src/Architecture/General Class-Level Information/ClassHierarchies.ql +++ b/cpp/ql/src/Architecture/General Class-Level Information/ClassHierarchies.ql @@ -1,6 +1,6 @@ /** * @name Class hierarchies - * @description Shows classes and their base classes. + * @description Shows an inheritance hierarchy for classes and their base classes. * @kind graph * @id cpp/architecture/class-hierarchies * @graph.layout organic diff --git a/cpp/ql/src/Architecture/General Class-Level Information/HubClasses.qhelp b/cpp/ql/src/Architecture/General Class-Level Information/HubClasses.qhelp deleted file mode 100644 index 2199dbe9447..00000000000 --- a/cpp/ql/src/Architecture/General Class-Level Information/HubClasses.qhelp +++ /dev/null @@ -1,25 +0,0 @@ - - - - - -

This query shows coupling between classes.

- -

Red, large boxes are hub types that depend on many other classes -and are depended on by many other classes.

- -
-
-

- - - - - -

- - - -
diff --git a/cpp/ql/src/Architecture/General Class-Level Information/HubClasses.ql b/cpp/ql/src/Architecture/General Class-Level Information/HubClasses.ql index 52614712d87..727d58e2d0f 100644 --- a/cpp/ql/src/Architecture/General Class-Level Information/HubClasses.ql +++ b/cpp/ql/src/Architecture/General Class-Level Information/HubClasses.ql @@ -1,6 +1,6 @@ /** * @name Hub classes - * @description Shows coupling between classes; red, large boxes are hub types that depend on many other classes + * @description Shows coupling between classes. Large, red, boxes are hub types that depend on many other classes * and are depended on by many other classes. * @kind treemap * @id cpp/architecture/hub-classes diff --git a/cpp/ql/src/Architecture/General Class-Level Information/InheritanceDepthDistribution.qhelp b/cpp/ql/src/Architecture/General Class-Level Information/InheritanceDepthDistribution.qhelp index ae24ffdf2e5..503c0402eec 100644 --- a/cpp/ql/src/Architecture/General Class-Level Information/InheritanceDepthDistribution.qhelp +++ b/cpp/ql/src/Architecture/General Class-Level Information/InheritanceDepthDistribution.qhelp @@ -5,44 +5,30 @@ -

This query shows the distribution of inheritance depth across all types, i.e. classes. Library types are ignored.

+

This query shows the distribution of inheritance depth across all types, that is, classes. Library types are ignored.

The result of this query is a line graph showing, for each number n, how many types have an inheritance depth of n, where the inheritance depth of a type is the length of a longest path in the inheritance hierarchy from top class to the type.

- -

When hovering the mouse pointer over a specific depth value, the number of types having this inheritance depth is displayed.

-
-
+ +

The depth of a type is an indication of how deeply nested a type is in a given design. Very deep types can be an indication of over-engineering, whereas a system with predominantly shallow types may not be exploiting object-orientation to the full.

+
- - - - -
  • -Shyam R. Chidamber and Chris F. Kemerer. -A Metrics Suite for Object Oriented Design -. +Shyam R. Chidamber and Chris F. Kemerer, +A Metrics Suite for Object Oriented Design +. IEEE Transactions on Software Engineering, -20(6), pages 476-493, June 1994. +20(6), pages 476-493, June 1994.
  • - - -Diomides D. Spinnelis. -Code Quality: The Open Source Perspective. -Addison-Wesley 2007. - - - -Diomides D. Spinnelis. -ckjm - Chidamber and Kemerer Java Metrics. -(implementation of CK metrics), 2006. - - - -
    +
  • +Lutz Prechelt, Barbara Unger, Michael Philippsen, and Walter Tich, A Controlled Experiment on Inheritance Depth as a Cost Factor for Code Maintenance +. +Journal of Systems and Software, 65 (2):115-126, 2003. +
  • + + diff --git a/cpp/ql/src/Architecture/General Class-Level Information/InheritanceDepthDistribution.ql b/cpp/ql/src/Architecture/General Class-Level Information/InheritanceDepthDistribution.ql index 2c445b6cf4e..2c9f0bc88c2 100644 --- a/cpp/ql/src/Architecture/General Class-Level Information/InheritanceDepthDistribution.ql +++ b/cpp/ql/src/Architecture/General Class-Level Information/InheritanceDepthDistribution.ql @@ -1,6 +1,6 @@ /** * @name Inheritance depth distribution - * @description Shows distribution of inheritance depth across all classes. + * @description Shows the distribution of inheritance depth across all classes. * @kind chart * @id cpp/architecture/inheritance-depth-distribution * @chart.type line diff --git a/cpp/ql/src/Architecture/General Namespace-Level Information/CyclicNamespaces.qhelp b/cpp/ql/src/Architecture/General Namespace-Level Information/CyclicNamespaces.qhelp index aed3cf62095..402cc6b8af0 100644 --- a/cpp/ql/src/Architecture/General Namespace-Level Information/CyclicNamespaces.qhelp +++ b/cpp/ql/src/Architecture/General Namespace-Level Information/CyclicNamespaces.qhelp @@ -7,19 +7,15 @@

    This query shows namespaces that cyclically depend on one another.

    - -

    - -

    -

    If there are cyclic dependencies between packages, they cannot be developed and tested independently. It is thus preferable to -eliminate such cycles from the program.

    + +

    If there are cyclic dependencies between packages, they cannot be developed and tested independently. +It is better to eliminate such cycles from the program.

    +
    - - - -
  • Robert Martin's Acyclic Dependencies Principle. -
  • + + + diff --git a/cpp/ql/src/Architecture/General Namespace-Level Information/GlobalNamespaceClasses.qhelp b/cpp/ql/src/Architecture/General Namespace-Level Information/GlobalNamespaceClasses.qhelp index 739cce689e8..426d527497d 100644 --- a/cpp/ql/src/Architecture/General Namespace-Level Information/GlobalNamespaceClasses.qhelp +++ b/cpp/ql/src/Architecture/General Namespace-Level Information/GlobalNamespaceClasses.qhelp @@ -5,18 +5,15 @@ -

    This query finds classes that belong to no namespace

    - +

    This query finds classes that belong to no namespace.

    -
    -

    If there are too many classes that belong to no namespace, consider creating namespaces to get a better project structure.

    + +

    If there are many classes that belong to no namespace, consider defining namespaces to create a better project structure.

    +
    - - - -
    - +
  • C++ reference: Namespaces +
  • diff --git a/cpp/ql/src/Architecture/General Namespace-Level Information/GlobalNamespaceClasses.ql b/cpp/ql/src/Architecture/General Namespace-Level Information/GlobalNamespaceClasses.ql index 81f8efb1c74..09a7bb30849 100644 --- a/cpp/ql/src/Architecture/General Namespace-Level Information/GlobalNamespaceClasses.ql +++ b/cpp/ql/src/Architecture/General Namespace-Level Information/GlobalNamespaceClasses.ql @@ -1,6 +1,6 @@ /** * @name Global namespace classes - * @description Finds classes that belong to no namespace + * @description Finds classes that belong to no namespace. * @kind table * @id cpp/architecture/global-namespace-classes */ diff --git a/cpp/ql/src/Architecture/General Namespace-Level Information/NamespaceDependencies.qhelp b/cpp/ql/src/Architecture/General Namespace-Level Information/NamespaceDependencies.qhelp deleted file mode 100644 index f7b4615d029..00000000000 --- a/cpp/ql/src/Architecture/General Namespace-Level Information/NamespaceDependencies.qhelp +++ /dev/null @@ -1,24 +0,0 @@ - - - - - -

    This query finds namespace dependencies and draws hierarchical graph.

    - -

    - - -

    -

    - - - - - -

    - - - -
    diff --git a/cpp/ql/src/Architecture/General Namespace-Level Information/NamespaceDependencies.ql b/cpp/ql/src/Architecture/General Namespace-Level Information/NamespaceDependencies.ql index e2f8e569ff1..fe79f5f66b4 100644 --- a/cpp/ql/src/Architecture/General Namespace-Level Information/NamespaceDependencies.ql +++ b/cpp/ql/src/Architecture/General Namespace-Level Information/NamespaceDependencies.ql @@ -1,6 +1,6 @@ /** * @name Namespace dependencies - * @description Shows dependencies between namespaces. + * @description Shows dependencies between namespaces as a hierarchical graph. * @kind graph * @id cpp/architecture/namespace-dependencies * @graph.layout hierarchical diff --git a/cpp/ql/src/Best Practices/RuleOfThree.qhelp b/cpp/ql/src/Best Practices/RuleOfThree.qhelp index b18af74d9e5..f9ac2b396b9 100644 --- a/cpp/ql/src/Best Practices/RuleOfThree.qhelp +++ b/cpp/ql/src/Best Practices/RuleOfThree.qhelp @@ -8,17 +8,13 @@

    This query finds classes that define a destructor, a copy constructor, or a copy assignment operator, but not all three of them. The compiler generates default implementations for these functions, and since they deal with similar concerns it is likely that if the default implementation of one of them is not satisfactory, then neither are those of the others.

    The query flags any such class with a warning, and also display the list of generated warnings in the result view.

    -
    -
    + +

    Explicitly define the missing functions.

    +
    - - - - -
    -
  • Wikipedia article - -
  • +
  • Wikipedia: Rule of three (C++ programming)
  • + + diff --git a/cpp/ql/src/Metrics/Namespaces/AbstractNamespaces.qhelp b/cpp/ql/src/Metrics/Namespaces/AbstractNamespaces.qhelp index 41cc622b84e..52477f2ed76 100644 --- a/cpp/ql/src/Metrics/Namespaces/AbstractNamespaces.qhelp +++ b/cpp/ql/src/Metrics/Namespaces/AbstractNamespaces.qhelp @@ -9,21 +9,17 @@

    Abstractness measures the proportion of abstract types in a package relative to the total number of types in that package. - A highly abstract package (where the metric value is close 1) - that is furthermore instable is likely to be useless: the - class hierarchy has been over-engineered, and all those - abstract types are not heavily used.

    - + A metric value close to 1 indicates a highly abstract package + that is also unstable. The class hierarchy is probably over-engineered, and the abstract types are unlikely to be much used.

    -
    -

    Try to simplify the class hierarchy.

    + +

    Consider reducing the level of abstraction by simplifying the class hierarchy.

    +
    - - - -
    - +
  • C++ reference: Namespaces +
  • +
  • Geeks for Geeks: Abstraction in C++
  • diff --git a/cpp/ql/src/Metrics/Namespaces/ConcreteNamespaces.qhelp b/cpp/ql/src/Metrics/Namespaces/ConcreteNamespaces.qhelp index 24cf0f06eb7..9f276340efd 100644 --- a/cpp/ql/src/Metrics/Namespaces/ConcreteNamespaces.qhelp +++ b/cpp/ql/src/Metrics/Namespaces/ConcreteNamespaces.qhelp @@ -5,18 +5,12 @@ -

    This query finds namespaces that have an abstractness equal to 0. These namesspaces do not contain any abstract classes.

    - +

    This query finds namespaces that have an abstractness equal to 0. These namespaces do not contain any abstract classes.

    -
    -

    - - - - -

    - +
  • C++ reference: Namespaces +
  • +
  • Geeks for Geeks: Abstraction in C++
  • diff --git a/cpp/ql/src/Metrics/Namespaces/HighAfferentCouplingNamespaces.qhelp b/cpp/ql/src/Metrics/Namespaces/HighAfferentCouplingNamespaces.qhelp index 15b284d875e..cd1257f39b6 100644 --- a/cpp/ql/src/Metrics/Namespaces/HighAfferentCouplingNamespaces.qhelp +++ b/cpp/ql/src/Metrics/Namespaces/HighAfferentCouplingNamespaces.qhelp @@ -9,17 +9,10 @@

    The query counts number of namespaces depending on a namespace and displays those that have more than 20 namespaces depending on them.

    - -
    -

    - - - - -

    - +
  • C++ reference: Namespaces +
  • diff --git a/cpp/ql/src/Metrics/Namespaces/HighDistanceFromMainLineNamespaces.qhelp b/cpp/ql/src/Metrics/Namespaces/HighDistanceFromMainLineNamespaces.qhelp index fb067f48569..5eb43361ebc 100644 --- a/cpp/ql/src/Metrics/Namespaces/HighDistanceFromMainLineNamespaces.qhelp +++ b/cpp/ql/src/Metrics/Namespaces/HighDistanceFromMainLineNamespaces.qhelp @@ -5,25 +5,28 @@ -

    This query finds namespaces that do not have a good balance between abstractness and stability.

    +

    This query finds namespaces that do not have a good balance between abstractness and stability where:

    + -

    This measure intends to capture the trade-off between abstractness - and instability: the ideal situation occurs when the sum of - abstractness and instability is one. That is, a package is +

    The metric tries to capture the trade-off between abstractness + and instability. For an ideal balance, the sum of + abstractness and instability should be one. That is, a package is completely abstract and stable (abstractness=1 and instability=0) or it is concrete and instable (abstractness=0 and instability=1). - We thus measure the distance from that ideal situation.

    - + This query measures the distance between the balance in the code base + and the ideal.

    -
    -

    - - - - -

    - +
  • C++ reference: Namespaces +
  • +
  • Geeks for Geeks: Abstraction in C++
  • diff --git a/cpp/ql/src/Metrics/Namespaces/HighEfferentCouplingNamespaces.qhelp b/cpp/ql/src/Metrics/Namespaces/HighEfferentCouplingNamespaces.qhelp deleted file mode 100644 index d97373f689a..00000000000 --- a/cpp/ql/src/Metrics/Namespaces/HighEfferentCouplingNamespaces.qhelp +++ /dev/null @@ -1,22 +0,0 @@ - - - - - -

    This query finds namespaces that have an efferent coupling (that is, the number of namespaces they depend on) greater than 20.

    - -
    -
    -

    - - - - - -

    - - - -
    diff --git a/cpp/ql/src/Metrics/Namespaces/StableNamespaces.qhelp b/cpp/ql/src/Metrics/Namespaces/StableNamespaces.qhelp index 6d3c1bb7067..44bdc327634 100644 --- a/cpp/ql/src/Metrics/Namespaces/StableNamespaces.qhelp +++ b/cpp/ql/src/Metrics/Namespaces/StableNamespaces.qhelp @@ -8,21 +8,14 @@

    This query finds namespaces that have an instability lower than 0.2.

    Instability is a measure of how likely a package is to be influenced - by changes to other packages. If this metric value is high, it is easily - influenced, if it is low, the impact is likely to be minimal. Instability + by changes to other packages. If this metric value is high, a package is easily + influenced. If the values is low, the impact of changes to other packages is likely to be minimal. Instability is estimated as the number of outgoing dependencies relative to the total number of depencies.

    - -
    -

    - - - - -

    - +
  • C++ reference: Namespaces +
  • diff --git a/cpp/ql/src/Metrics/Namespaces/UnstableNamespaces.qhelp b/cpp/ql/src/Metrics/Namespaces/UnstableNamespaces.qhelp index 45377a202e4..bac1609760b 100644 --- a/cpp/ql/src/Metrics/Namespaces/UnstableNamespaces.qhelp +++ b/cpp/ql/src/Metrics/Namespaces/UnstableNamespaces.qhelp @@ -8,21 +8,14 @@

    This query finds namespaces that have an instability higher than 0.8.

    Instability is a measure of how likely a package is to be influenced - by changes to other packages. If this metric value is high, it is easily - influenced, if it is low, the impact is likely to be minimal. Instability + by changes to other packages. If this metric value is high, a package is easily + influenced. If the values is low, the impact of changes to other packages is likely to be minimal. Instability is estimated as the number of outgoing dependencies relative to the total number of depencies.

    - -
    -

    - - - - -

    - +
  • C++ reference: Namespaces +