forked from github/codeql
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHighDistanceFromMainLineNamespaces.qhelp
More file actions
32 lines (28 loc) · 1.14 KB
/
HighDistanceFromMainLineNamespaces.qhelp
File metadata and controls
32 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<!DOCTYPE qhelp PUBLIC
"-//Semmle//qhelp//EN"
"qhelp.dtd">
<qhelp>
<overview>
<p>This query finds namespaces that do not have a good balance between abstractness and stability where:</p>
<ul>
<li>
Abstractness measures the proportion of abstract types in a namespace relative to the total number of types in that namespace.
</li>
<li>
Instability measures the level of expectation that changes to other namespaces will affect this namespace.
</li>
</ul>
<p>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).
This query measures the distance between the balance in the code base
and the ideal.</p>
</overview>
<references>
<li>C++ reference: <a href="https://en.cppreference.com/w/cpp/language/namespace">Namespaces</a>
</li>
<li>Geeks for Geeks: <a href="https://www.geeksforgeeks.org/abstraction-in-c/">Abstraction in C++</a></li>
</references>
</qhelp>