Skip to content

Commit 36ebe99

Browse files
authored
Merge pull request #19707 from microsoft/lwsimpkins/fix-qhelp-upstream
fix qhelp files
2 parents af977e9 + f96a250 commit 36ebe99

File tree

6 files changed

+19
-44
lines changed

6 files changed

+19
-44
lines changed

cpp/ql/src/Metrics/Classes/CNumberOfFunctions.qhelp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,16 @@ need to be part of the class. (A classic example of this is the
4949
observes, there are at least two key problems with this approach:
5050

5151

52-
<ul>
53-
<li>
54-
It may be possible to generalize some of the utility functions beyond the
52+
<i>1. It may be possible to generalize some of the utility functions beyond the
5553
narrow context of the class in question -- by bundling them with the class,
5654
the class author reduces the scope for functionality reuse.
57-
</li>
5855

59-
<li>
60-
It's usually impossible for the class author to know every possible
56+
2. It's usually impossible for the class author to know every possible
6157
operation that the user might want to perform on the class, so the public
6258
interface will inherently be incomplete. New utility functions will end up
6359
having a different syntax to the privileged public functions in the class,
6460
negatively impacting on code consistency.
65-
</li>
66-
</ul>
61+
</i>
6762

6863
To refactor a class like this, simply move its utility functions elsewhere,
6964
paring its public interface down to the bare minimum.

cpp/ql/src/Metrics/Classes/CSizeOfAPI.qhelp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,17 @@ need to be part of the class. (A classic example of this is the
4646
<code>std::string</code> class in the C++ Standard Library.) As [Sutter]
4747
observes, there are at least two key problems with this approach:
4848

49-
<ul>
50-
<li>
51-
It may be possible to generalize some of the utility functions beyond the
49+
<i>
50+
1. It may be possible to generalize some of the utility functions beyond the
5251
narrow context of the class in question -- by bundling them with the class,
5352
the class author reduces the scope for functionality reuse.
54-
</li>
5553

56-
<li>
57-
It's usually impossible for the class author to know every possible
54+
2. It's usually impossible for the class author to know every possible
5855
operation that the user might want to perform on the class, so the public
5956
interface will inherently be incomplete. New utility functions will end up
6057
having a different syntax to the privileged public functions in the class,
6158
negatively impacting on code consistency.
62-
</li>
63-
</ul>
59+
</i>
6460

6561
To refactor a class like this, simply move its utility functions elsewhere,
6662
paring its public interface down to the bare minimum.

java/ql/src/Metrics/RefTypes/TInheritanceDepth.qhelp

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,13 @@ that something is amiss, but further investigation will be needed to clarify
2929
the cause of the problem. Here are two possibilities:
3030
</p>
3131

32-
<ul>
33-
34-
<li>
35-
A class and its superclass represent fundamentally the same abstraction.
32+
<p>
33+
1. A class and its superclass represent fundamentally the same abstraction.
3634
In this case, they should generally be merged together (see the 'Collapse
3735
Hierarchy' refactoring on pp.279-80 of [Fowler]). For example, suppose
3836
that in the following class hierarchy both A and C represent fundamentally
3937
the same thing, then they should be merged together as shown:
38+
</p>
4039

4140
<table>
4241
<tbody><tr>
@@ -48,11 +47,9 @@ the same thing, then they should be merged together as shown:
4847
<td>After</td>
4948
</tr>
5049
</tbody></table>
51-
</li>
5250

53-
<li>
5451
<p>
55-
The class hierarchy is trying to represent variation in more than one
52+
2. The class hierarchy is trying to represent variation in more than one
5653
dimension using single inheritance. This can lead to an unnecessarily
5754
deep class hierarchy with lots of code duplication. For example, consider
5855
the following:
@@ -81,9 +78,6 @@ amount of code duplication that will be necessary.
8178
For readers who are interested in this sort of approach, a good reference is
8279
[West].
8380
</p>
84-
</li>
85-
86-
</ul>
8781

8882

8983

java/ql/src/Metrics/RefTypes/TNumberOfCallables.qhelp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,17 @@ need to be part of the class. (A classic example of this is the
4949
<code>std::string</code> class in the C++ Standard Library.) As [Sutter]
5050
observes, there are at least two key problems with this approach:
5151

52-
<ul>
53-
<li>
54-
It may be possible to generalize some of the utility methods beyond the
52+
<i>
53+
1. It may be possible to generalize some of the utility methods beyond the
5554
narrow context of the class in question -- by bundling them with the class,
5655
the class author reduces the scope for functionality reuse.
57-
</li>
5856

59-
<li>
60-
It's usually impossible for the class author to know every possible
57+
2. It's usually impossible for the class author to know every possible
6158
operation that the user might want to perform on the class, so the public
6259
interface will inherently be incomplete. New utility methods will end up
6360
having a different syntax to the privileged public methods in the class,
6461
negatively impacting on code consistency.
65-
</li>
66-
</ul>
62+
</i>
6763

6864
To refactor a class like this, simply move its utility methods elsewhere,
6965
paring its public interface down to the bare minimum.

java/ql/src/Metrics/RefTypes/TNumberOfFields.qhelp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,9 @@ If the class is too big, you should split it into multiple smaller classes.
2525
</li>
2626

2727
<li>
28-
<p>
2928
If several of the fields are part of the same abstraction, you should
3029
group them into a separate class, using the 'Extract Class' refactoring described
3130
in [Fowler].
32-
</p>
3331
</li>
3432
</ul>
3533

java/ql/src/Metrics/RefTypes/TSizeOfAPI.qhelp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,17 @@ need to be part of the class. (A classic example of this is the
4646
<code>std::string</code> class in the C++ Standard Library.) As [Sutter]
4747
observes, there are at least two key problems with this approach:
4848

49-
<ul>
50-
<li>
51-
It may be possible to generalize some of the utility methods beyond the
49+
<i>
50+
1. It may be possible to generalize some of the utility methods beyond the
5251
narrow context of the class in question -- by bundling them with the class,
5352
the class author reduces the scope for functionality reuse.
54-
</li>
5553

56-
<li>
57-
It's usually impossible for the class author to know every possible
54+
2. It's usually impossible for the class author to know every possible
5855
operation that the user might want to perform on the class, so the public
5956
interface will inherently be incomplete. New utility methods will end up
6057
having a different syntax to the privileged public methods in the class,
6158
negatively impacting on code consistency.
62-
</li>
63-
</ul>
59+
</i>
6460

6561
To refactor a class like this, simply move its utility methods elsewhere,
6662
paring its public interface down to the bare minimum.

0 commit comments

Comments
 (0)