SkaceKamen / vscode-sqflint

SQF Language server extension
MIT License
19 stars 9 forks source link

_thisEvent magic var false positives #147

Open mwpowellhtx opened 8 months ago

mwpowellhtx commented 8 months ago

_thisEvent indicated as a false positive. By contrast _thisEventHandler did not and did not warn, maybe because the first was the offending token, I do not know.

[_thisEvent, _thisEventHandler] params ["_event", "_ehID"];
// ^^^^^^^^

In the context of an ctrlAddEventHandler use case.

_thisEventHandler does not warn whatsoever, correctly, I think. Tried adding _thisEvent to the sqflint.ignoredVariables settings to no avail, so the case must be deeply rooted in the token parsing, baked into the cake, if you will.

Overall, need the ability to better train the LINT with various situations. It covers 80-90 percent of the common ones, but for gremlins such as this.

Or at least somehow the ability to #define our way around warnings such as these.

Best!