Closed esetnik closed 4 years ago
Hi, Add this setting to coc-settings.json
and give it a try.
"intelephense.diagnostics.unusedSymbols": false
Hi, Add this setting to
coc-settings.json
and give it a try.
"intelephense.diagnostics.unusedSymbols": false
But I don't want to disable all of the unused symbol diagnostics, only this particular case where it's an incorrect error. In this case I can't do anything about the warning so I'm just stuck with it.
coc-phpls uses the Language Server's intelephense
.
This problem has been considered to be addressed in intelephense
itself, but it has not yet been implemented.
Ref: https://github.com/bmewburn/vscode-intelephense/issues/568
Describe the bug When a function defines multiple arguments but does not use all of them, a warning is generated "Symbol is declared but not used". Functions which are called by third-party code do not have control over their signature and must take parameters in a specific order even if they don't use them internally. So this should not be a warning or there should be some way to turn off the warning.
Other linters like eslint allow rules for ignoring this rule when a specific matching rule exists. E.g. renaming
$request
to$_request
would silence the warning.To Reproduce Steps to reproduce the behavior:
Expected behavior No error message
Screenshots
Desktop (please complete the following information):
Additional context