Skip to content

Commit c2b5c39

Browse files
authored
Merge pull request #10507 from erik-krogh/cpp-followMsg
CPP: Make more alert-messages follow the style guide
2 parents 3bd456e + 96b46de commit c2b5c39

File tree

180 files changed

+918
-905
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

180 files changed

+918
-905
lines changed

cpp/ql/src/Architecture/General Namespace-Level Information/GlobalNamespaceClasses.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ where
1515
c.fromSource() and
1616
c.isTopLevel() and
1717
c.getParentScope() instanceof GlobalNamespace
18-
select c, "This class is not declared in any namespace"
18+
select c, "This class is not declared in any namespace."

cpp/ql/src/Architecture/Refactoring Opportunities/ClassesWithManyDependencies.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ where
1616
t.fromSource() and
1717
n = t.getMetrics().getEfferentSourceCoupling() and
1818
n > 10
19-
select t as class_, "This class has too many dependencies (" + n.toString() + ")"
19+
select t as class_, "This class has too many dependencies (" + n.toString() + ")."

cpp/ql/src/Architecture/Refactoring Opportunities/ComplexFunctions.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ where
1717
n = f.getMetrics().getNumberOfCalls() and
1818
n > 99 and
1919
not f.isMultiplyDefined()
20-
select f as function, "This function makes too many calls (" + n.toString() + ")"
20+
select f as function, "This function makes too many calls (" + n.toString() + ")."

cpp/ql/src/Architecture/Refactoring Opportunities/FunctionsWithManyParameters.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ where
1818
f.getMetrics().getNumberOfParameters() > 15
1919
select f,
2020
"This function has too many parameters (" + f.getMetrics().getNumberOfParameters().toString() +
21-
")"
21+
")."

cpp/ql/src/Best Practices/Likely Errors/Slicing.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ where
2121
rhsType.getAMember() = m and
2222
not m.(VirtualFunction).isPure()
2323
) // add additional checks for concrete members in in-between supertypes
24-
select e, "This assignment expression slices from type $@ to $@", rhsType, rhsType.getName(),
24+
select e, "This assignment expression slices from type $@ to $@.", rhsType, rhsType.getName(),
2525
lhsType, lhsType.getName()

cpp/ql/src/Best Practices/NVI.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ where
1818
f.hasSpecifier("virtual") and
1919
f.getFile().fromSource() and
2020
not f instanceof Destructor
21-
select f, "Avoid having public virtual methods (NVI idiom)"
21+
select f, "Avoid having public virtual methods (NVI idiom)."

cpp/ql/src/Best Practices/NVIHub.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ where
2323
fclass = f.getDeclaringType() and
2424
hubIndex = fclass.getMetrics().getAfferentCoupling() * fclass.getMetrics().getEfferentCoupling() and
2525
hubIndex > 100
26-
select f, "Avoid having public virtual methods (NVI idiom)"
26+
select f, "Avoid having public virtual methods (NVI idiom)."

cpp/ql/src/Best Practices/SwitchLongCase.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,5 @@ where
3838
sc = switch.getASwitchCase() and
3939
tooLong(sc) and
4040
switchCaseLength(sc, lines)
41-
select switch, "Switch has at least one case that is too long: $@", sc,
41+
select switch, "Switch has at least one case that is too long: $@.", sc,
4242
sc.getExpr().toString() + " (" + lines.toString() + " lines)"

cpp/ql/src/Best Practices/Unused Entities/UnusedLocals.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ where
5858
not exists(AsmStmt s | f = s.getEnclosingFunction()) and
5959
not v.getAnAttribute().getName() = "unused" and
6060
not any(ErrorExpr e).getEnclosingFunction() = f // unextracted expr may use `v`
61-
select v, "Variable " + v.getName() + " is not used"
61+
select v, "Variable " + v.getName() + " is not used."

cpp/ql/src/Best Practices/Unused Entities/UnusedStaticVariables.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ where
2727
not declarationHasSideEffects(v) and
2828
not v.getAnAttribute().hasName("used") and
2929
not v.getAnAttribute().hasName("unused")
30-
select v, "Static variable " + v.getName() + " is never read"
30+
select v, "Static variable " + v.getName() + " is never read."

0 commit comments

Comments
 (0)