DScanner: Enable warnings for unused parameters ...#10700
DScanner: Enable warnings for unused parameters ...#10700MoonlightSentinel wants to merge 6 commits intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @MoonlightSentinel! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + dmd#10700" |
fbfd8c4 to
e88df8d
Compare
rainers
left a comment
There was a problem hiding this comment.
Some of the changes are good (e.g. adding module declarations), but I'm not so sure about enabling warnings about unused parameters. Removing them also reduces information provided by intellisense or documentation.
e88df8d to
14309d0
Compare
I think checking for unused parameters should be done because it can reveal violations of a functions contract/documentation (see e.g. Anyway, i would be fine with splitting this into different PRs for local/parameters. But limiting this check to local variables is currently not possible (because it was introduced after dlang-community/D-Scanner#786 appeared. |
|
PR to enable checks for unused variables only #10714 |
14309d0 to
5b9072f
Compare
|
Closing until D-Scanner provides some means to allow unused parameters for documentation purposes. |
... and fix
access.d,astbase,todt.d,traits.dandtypesem.dfor starters. This obviously requires quite a blacklist right now but still covers about 2/3 of all source files.Bonus: This revealed that the documentation of
checkAccessdid not match its implementation.CC @wilzbach