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