Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

False positive "Argument 1 is named 'expected', but this is the name of parameter 2" #532

Open
andre2007 opened this issue Nov 10, 2017 · 0 comments
Labels

Comments

@andre2007
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant