D-Scanner
D-Scanner copied to clipboard
False positive "Argument 1 is named 'expected', but this is the name of parameter 2"
While executing dscanner -S for d-unit there are false positives like this example:
.\src\dunit\ng\assertion.d(24:18)[warn]: Argument 1 is named 'expected', but this is the name of parameter 2
In module dunit.ng.assertion there is this function
void assertEquals(T, U)(T actual, U expected, lazy string msg = null,
string file = __FILE__,
size_t line = __LINE__)
{
import dunit.assertion : assertEquals;
assertEquals(expected, actual, msg, file, line);
}
The assertEquals function which is called within the function assertEquals is another function from another module which has an other order of arguments.
But D-Scanner uses the signature from the outer function.