Warning message consistency

This commit is contained in:
Hackerpilot 2015-10-30 16:28:00 -07:00
parent fab67f9abd
commit cc7d0112f3
2 changed files with 7 additions and 3 deletions

View File

@ -76,7 +76,7 @@ class AutoRefAssignmentCheck : BaseAnalyzer
private:
enum string MESSAGE = "Assignment to auto-ref function parameter";
enum string MESSAGE = "Assignment to auto-ref function parameter.";
enum string KEY = "dscanner.suspicious.auto_ref_assignment";
invariant

View File

@ -10,10 +10,14 @@ import dparse.lexer;
import analysis.base;
import dsymbol.scope_ : Scope;
/**
* Checks for redundant parenthesis
*/
class RedundantParenCheck : BaseAnalyzer
{
alias visit = BaseAnalyzer.visit;
///
this(string fileName, const(Scope)* sc)
{
super(fileName, sc);
@ -32,7 +36,7 @@ class RedundantParenCheck : BaseAnalyzer
if (unary.primaryExpression.expression is null)
goto end;
addErrorMessage(unary.primaryExpression.expression.line,
unary.primaryExpression.expression.column, KEY, "Redundant parenthesis");
unary.primaryExpression.expression.column, KEY, "Redundant parenthesis.");
end:
statement.accept(this);
}
@ -50,7 +54,7 @@ class RedundantParenCheck : BaseAnalyzer
if (unary.primaryExpression.expression is null)
goto end;
addErrorMessage(primaryExpression.expression.line,
primaryExpression.expression.column, KEY, "Redundant parenthesis");
primaryExpression.expression.column, KEY, "Redundant parenthesis.");
end:
primaryExpression.accept(this);
}