Findings should be reported at the exact place where they are in the code.
More specifically, findings for different functions should not be reported at the exact same line/column position.
Background
Some tools or IDEs only display one finding per line/column, which currently prevents some findings from being displayed.
One example of this are the tasks in VS Code, which can be used to display problems based on the output of a task, like running ui5lint.
Example
The code
sap.ui.getCore().attachInit(() => {});
should create two findings
Call to deprecated function 'getCore' (sap.ui.getCore) pointing to column 8 (getCore)
Call to deprecated function 'attachInit' of class 'Core' pointing to column 18 (attachInit)
[
{
"filePath": "webapp/Test.js",
"messages": [
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 1,
"column": 18,
"message": "Call to deprecated function 'attachInit' of class 'Core'"
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 1,
"column": 8,
"message": "Call to deprecated function 'getCore' (sap.ui.getCore)"
}
],
"errorCount": 2,
"warningCount": 0,
"fatalErrorCount": 0
}
]
Current Behavior
Both findings point to column 1
[
{
"filePath": "webapp/Test.js",
"messages": [
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 1,
"column": 1,
"message": "Call to deprecated function 'attachInit' of class 'Core'"
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 1,
"column": 1,
"message": "Call to deprecated function 'getCore' (sap.ui.getCore)"
}
],
"errorCount": 2,
"warningCount": 0,
"fatalErrorCount": 0
}
]
Steps to Reproduce the Issue
See example above.
Context
UI5 linter version: 0.2.2
Node.js Version: 20.12.2
npm Version: 10.5.0
OS/Platform: macOS
Browser (if relevant): unknown
Other information regarding your environment (optional): nothing
Expected Behavior
Findings should be reported at the exact place where they are in the code. More specifically, findings for different functions should not be reported at the exact same line/column position.
Background
Some tools or IDEs only display one finding per line/column, which currently prevents some findings from being displayed. One example of this are the tasks in VS Code, which can be used to display problems based on the output of a task, like running
ui5lint
.Example
The code
should create two findings
Call to deprecated function 'getCore' (sap.ui.getCore)
pointing to column8
(getCore
)Call to deprecated function 'attachInit' of class 'Core'
pointing to column18
(attachInit
)Current Behavior
Both findings point to column 1
Steps to Reproduce the Issue
See example above.
Context
0.2.2
20.12.2
10.5.0
macOS
unknown
nothing
Log Output / Stack Trace
See above.