From b6233f6d7dd67719971e16e8946a1a6d499c1002 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Fri, 29 May 2015 08:47:01 -0700 Subject: [PATCH] Fix #260 by skipping declarations inside of version(unittest) or version(none) --- src/analysis/undocumented.d | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/analysis/undocumented.d b/src/analysis/undocumented.d index 165f807..de6f1ba 100644 --- a/src/analysis/undocumented.d +++ b/src/analysis/undocumented.d @@ -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) {}