mirror of
https://github.com/dlang-community/D-Scanner.git
synced 2025-04-27 05:40:01 +03:00
Fix #260 by skipping declarations inside of version(unittest) or version(none)
This commit is contained in:
parent
a853c9d789
commit
b6233f6d7d
1 changed files with 9 additions and 0 deletions
|
@ -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) {}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue