Fix #260 by skipping declarations inside of version(unittest) or version(none)

This commit is contained in:
Hackerpilot 2015-05-29 08:47:01 -07:00
parent a853c9d789
commit b6233f6d7d
1 changed files with 9 additions and 0 deletions

View File

@ -89,6 +89,15 @@ class UndocumentedDeclarationCheck : BaseAnalyzer
}
}
override void visit(const ConditionalDeclaration cond)
{
const VersionCondition ver = cond.compileCondition.versionCondition;
if (ver is null || ver.token != tok!"unittest" && ver.token.text != "none")
cond.accept(this);
else if (cond.falseDeclaration !is null)
visit(cond.falseDeclaration);
}
override void visit(const FunctionBody fb) {}
override void visit(const Unittest u) {}