AutoFunctionChecker

Checks for auto functions without return statement.

Auto function without return statement can be an omission and are not detected by the compiler. However sometimes they can be used as a trick to infer attributes.

Constructors

this
this(string fileName, bool skipTests)

Members

Aliases

visit
alias visit = BaseAnalyzer.visit
Undocumented in source.

Functions

visit
void visit(const(FunctionDeclaration) decl)
Undocumented in source. Be warned that the author may not have intended to support it.
visit
void visit(const(ReturnStatement) rst)
Undocumented in source. Be warned that the author may not have intended to support it.
visit
void visit(const(AssertArguments) exp)
Undocumented in source. Be warned that the author may not have intended to support it.
visit
void visit(const(MixinExpression) mix)
Undocumented in source. Be warned that the author may not have intended to support it.
visit
void visit(const(PrimaryExpression) exp)
Undocumented in source. Be warned that the author may not have intended to support it.
visit
void visit(const(AutoDeclaration) decl)
Undocumented in source. Be warned that the author may not have intended to support it.
visit
void visit(const(VariableDeclaration) decl)
Undocumented in source. Be warned that the author may not have intended to support it.

Mixins

__anonymous
mixin AnalyzerInfo!"auto_function_check"
Undocumented in source.

Inherited Members

From BaseAnalyzer

getName
string getName()
Undocumented in source. Be warned that the author may not have intended to support it.
messages
Message[] messages()
Undocumented in source. Be warned that the author may not have intended to support it.
visit
alias visit = ASTVisitor.visit
Undocumented in source.
visit
void visit(Unittest unittest_)

Visits a unittest.

inAggregate
bool inAggregate;
Undocumented in source.
skipTests
bool skipTests;
Undocumented in source.
visitTemplate
template visitTemplate(T)
Undocumented in source.
addErrorMessage
void addErrorMessage(size_t line, size_t column, string key, string message)
Undocumented in source. Be warned that the author may not have intended to support it.
fileName
string fileName;

The file name

sc
const(Scope)* sc;
Undocumented in source.
_messages
MessageSet _messages;
Undocumented in source.

Meta