dlang-community / D-Scanner

Swiss-army knife for D source code

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unused parameter check on delegate literals is problematic

Geod24 opened this issue · comments

A delegate literal usually will need to match a certain parameter list, so it is often not up to the programmer to decide what parameters are there. Sometimes, a programmer might want to pass stubs / ignore some arguments.
The common way to do this is to use unnamed parameters. However, in D, this is not possible: https://issues.dlang.org/show_bug.cgi?id=7198

With ESLint, the general convention is that unsused identifiers should be prefixed with an _ character and of course simply naming your unused parameter as _ is common.

the same applies here, see #490

(you can use _, __ or any other number of underscores you want)