From 93418e3aa92329e913ad078f608d8255c3c2e73c Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Tue, 14 May 2019 16:09:24 +0200 Subject: [PATCH 1/2] Fix #760 - ignore deprecated symbols in the undocumented check --- src/dscanner/analysis/undocumented.d | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/dscanner/analysis/undocumented.d b/src/dscanner/analysis/undocumented.d index 01f5584..439c237 100644 --- a/src/dscanner/analysis/undocumented.d +++ b/src/dscanner/analysis/undocumented.d @@ -150,6 +150,13 @@ private: override void visit(const T declaration) { import std.traits : hasMember; + static if (hasMember!(T, "storageClasses")) + { + // stop at declarations with a deprecated in their storage classes + foreach (sc; declaration.storageClasses) + if (sc.deprecated_ !is null) + return; + } if (currentIsInteresting()) { @@ -248,7 +255,7 @@ private: bool currentIsInteresting() { return stack[$ - 1].protection == tok!"public" - && !stack[$ - 1].isOverride && !stack[$ - 1].isDisabled && !stack[$ - 1].isDeprecated; + && !getOverride() && !getDisabled() && !getDeprecated(); } void set(IdType p) @@ -332,6 +339,12 @@ unittest union U{} }, sac); + // https://github.com/dlang-community/D-Scanner/issues/760 + assertAnalyzerWarnings(q{ + deprecated auto func(){} + deprecated auto func()(){} + }, sac); + stderr.writeln("Unittest for UndocumentedDeclarationCheck passed."); } From e2b5f852e6f109dc96460fd3ef6ce5e6df7d6648 Mon Sep 17 00:00:00 2001 From: Sebastian Wilzbach Date: Tue, 14 May 2019 23:28:23 +0200 Subject: [PATCH 2/2] Upgrade EMSI containers --- containers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers b/containers index 257c041..a978c3c 160000 --- a/containers +++ b/containers @@ -1 +1 @@ -Subproject commit 257c0418f34709dd667f95b5dffabedc2b3099e4 +Subproject commit a978c3cda3f6ec3ba7449ec5c08dd5cd4dd79c6e