Added docs stats to the build script

This commit is contained in:
Matthew Leibowitz 2016-11-03 05:00:38 +02:00
Родитель 40f6f10a9e
Коммит f8a56eb8a5
1 изменённых файлов: 13 добавлений и 4 удалений

Просмотреть файл

@ -249,16 +249,25 @@ Task ("docs")
.Elements ("Docs"); .Elements ("Docs");
totalTypes += typesWithDocs.Count (); totalTypes += typesWithDocs.Count ();
typeCount += typesWithDocs.Where (m => m.Value != null && m.Value.IndexOf ("To be added.") >= 0).Count (); var currentTypeCount = typesWithDocs.Where (m => m.Value != null && m.Value.IndexOf ("To be added.") >= 0).Count ();
typeCount += currentTypeCount;
var membersWithDocs = xdoc.Root var membersWithDocs = xdoc.Root
.Elements ("Members") .Elements ("Members")
.Elements ("Member") .Elements ("Member")
.Where (m => m.Attribute ("MemberName") != null && m.Attribute ("MemberName").Value != "Dispose") .Where (m => m.Attribute ("MemberName") != null && m.Attribute ("MemberName").Value != "Dispose" && m.Attribute ("MemberName").Value != "Finalize")
.Elements ("Docs"); .Elements ("Docs");
totalMembers += membersWithDocs.Count (); totalMembers += membersWithDocs.Count ();
memberCount += membersWithDocs.Where (m => m.Value != null && m.Value.IndexOf ("To be added.") >= 0).Count (); var currentMemberCount = membersWithDocs.Where (m => m.Value != null && m.Value.IndexOf ("To be added.") >= 0).Count ();
memberCount += currentMemberCount;
currentMemberCount += currentTypeCount;
if (currentMemberCount > 0) {
var fullName = xdoc.Root.Attribute ("FullName");
if (fullName != null)
Information ("Docs missing on {0} = {1}", fullName.Value, currentMemberCount);
}
} }
Information ( Information (
"Documentation missing in {0}/{1} ({2:0.0%}) types and {3}/{4} ({5:0.0%}) members.", "Documentation missing in {0}/{1} ({2:0.0%}) types and {3}/{4} ({5:0.0%}) members.",