Ignore some operator overloads when checking for undocumented declarations

This commit is contained in:
Hackerpilot 2014-09-02 11:46:14 -07:00
parent 3e3175ca12
commit 8eb19d9235
1 changed files with 13 additions and 2 deletions

View File

@ -112,8 +112,12 @@ private:
{
static if (hasMember!(T, "name"))
{
addMessage(declaration.name.line, declaration.name.column,
declaration.name.text);
import std.algorithm : canFind;
if (!ignoredNames.canFind(declaration.name.text))
{
addMessage(declaration.name.line, declaration.name.column,
declaration.name.text);
}
}
else
{
@ -177,3 +181,10 @@ private:
ProtectionInfo[] stack;
}
// Ignore undocumented symbols with these names
private immutable string[] ignoredNames = [
"opCmp",
"opEquals",
"toString",
"toHash"
];