SAP / ui5-linter

A static code analysis tool for UI5
Apache License 2.0
47 stars 4 forks source link

fix: Error message and position information for deprecated function calls #131

Closed RandomByte closed 4 months ago

RandomByte commented 4 months ago

When detecting a deprecated function call, correctly determine the type of the owner of that function.

Fixes https://github.com/SAP/ui5-linter/issues/103


Use the node of the actual call instead of the whole expression to determine the line/column position for the error object.

Fixes https://github.com/SAP/ui5-linter/issues/94

matz3 commented 4 months ago

LGTM. It introduces some duplicate findings of global access + deprecated API usage, but I think that's fine and it would be very hard to deduplicate all of them.

I also just checked whether the deduplication still makes sense and it currently does, for the jQuery.sap usage, which would otherwise be reported as global and deprecated usage, which IMO would not be beneficial to the user.