ui5-linter
ui5-linter copied to clipboard
feat: Add new output format markdown
fix #178
Added new markdown option for output as suggested in the issue.
Added tests for output.
Here is a sample output with ui5lint --format markdown --details:
Markdown output sample
UI5 Linter Report
/Users/marianzeis/DEV//webapp/control/DynamicCompartmentBox.ts
- 🔴 [81:7] Call to deprecated function 'writeControlData' of class 'RenderManager'
- Details: (since 1.92) - Instead use sap.ui.core.RenderManager#openStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/openStart) or sap.ui.core.RenderManager#voidStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/voidStart) of the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager) and pass the desired control data as the second parameter to the new API.
- 🔴 [104:9] Call to deprecated function 'write' of class 'RenderManager'
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
write. Typically,writeis used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
- 🔴 [108:9] Call to deprecated function 'write' of class 'RenderManager'
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
write. Typically,writeis used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
- 🔴 [129:7] Call to deprecated function 'write' of class 'RenderManager'
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
write. Typically,writeis used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
/Users/marianzeis/DEV//webapp/control/DynamicCompartmentBoxItem.ts
- 🔴 [142:12] Call to deprecated function 'write' of class 'RenderManager'
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
write. Typically,writeis used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
- 🔴 [147:12] Call to deprecated function 'writeControlData' of class 'RenderManager'
- Details: (since 1.92) - Instead use sap.ui.core.RenderManager#openStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/openStart) or sap.ui.core.RenderManager#voidStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/voidStart) of the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager) and pass the desired control data as the second parameter to the new API.
- 🔴 [167:16] Call to deprecated function 'write' of class 'RenderManager'
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
write. Typically,writeis used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
- 🔴 [173:16] Call to deprecated function 'write' of class 'RenderManager'
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
write. Typically,writeis used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
- Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for
/Users/marianzeis/DEV//webapp/localService/mockserver.js
- 🔴 [16:34] Use of deprecated API 'jQuery.sap.getUriParameters'
- Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
- 🔴 [17:33] Use of deprecated API 'jQuery.sap.getModulePath'
- Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
- 🔴 [18:32] Use of deprecated API 'jQuery.sap.getModulePath'
- Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
- 🔴 [22:29] Use of deprecated API 'jQuery.sap.syncGetJSON'
- Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
- 🔴 [25:32] Use of deprecated API 'jQuery.sap.getModulePath'
- Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
- 🔴 [81:13] Use of deprecated API 'jQuery.sap.log.info'
- Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
- 🔴 [87:37] Use of deprecated API 'jQuery.sap.getModulePath'
- Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
- 🔴 [100:37] Use of deprecated API 'jQuery.sap.require'
- Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
- 🔴 [102:56] Use of deprecated API 'jQuery.sap.sjax'
- Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
- 🔴 [107:62] Use of deprecated API 'jQuery.sap.serializeXML'
- Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
/Users/marianzeis/DEV//webapp/util/Util.ts
- 🔴 [24:23] Access of global variable 'sap' (sap.ui.getCore)
- 🔴 [24:30] Call to deprecated function 'getCore' (sap.ui.getCore)
- Details: (since 1.118) - Please require 'sap/ui/core/Core' instead and use the module export directly without using 'new'."
- 🔴 [24:40] Call to deprecated function 'getConfiguration' of class 'Core'
- Details: (since 1.120) - Please see Configuration (https://ui5.sap.com/1.120/#/api/sap.ui.core.Configuration) for the corrsponding replacements.
- 🔴 [24:59] Call to deprecated function 'getLanguage' of class 'Configuration'
- Details: (since 1.119) - Please use Localization.getLanguage (https://ui5.sap.com/1.120/#/api/module:sap/base/i18n/Localization%23methods/sap/base/i18n/Localization.getLanguage)instead.
/Users/marianzeis/DEV//webapp/view/Source.view.xml
- 🔴 [111:37] Use of deprecated property 'useExportToExcel' of class 'SmartTable'
- Details: (since 1.100) - replaced by
enableExportproperty.
- Details: (since 1.100) - replaced by
- 🔴 [143:41] Use of deprecated property 'visibleRowCount' of class 'TreeTable'
- Details: (since 1.119) - use the
rowModeaggregation instead.
- Details: (since 1.119) - use the
- 🔴 [143:61] Use of deprecated property 'rootLevel' of class 'TreeTable'
- Details: (since 1.76) - replaced by the
rootLevelbinding parameter. May not work with all bindings.
- Details: (since 1.76) - replaced by the
- 🔴 [143:75] Use of deprecated property 'expandFirstLevel' of class 'TreeTable'
- Details: (since 1.46.3) - replaced by the
numberOfExpandedLevelsbinding parameter. May not work with all bindings.
- Details: (since 1.46.3) - replaced by the
/Users/marianzeis/DEV//webapp/view/Target.view.xml
- 🔴 [120:29] Use of deprecated property 'visibleRowCount' of class 'TreeTable'
- Details: (since 1.119) - use the
rowModeaggregation instead.
- Details: (since 1.119) - use the
/Users/marianzeis/DEV//webapp/view/TargetBadHU.view.xml
- 🔴 [89:17] Use of deprecated property 'visibleRowCount' of class 'Table'
- Details: (since 1.119) - use the
rowModeaggregation instead.
- Details: (since 1.119) - use the
Summary
- Total problems: 28
- Errors: 28
- Warnings: 0
Text output sample
UI5 linter report:
/Users/marianzeis/DEV/<apppath>/webapp/control/DynamicCompartmentBox.ts
81:7 error Call to deprecated function 'writeControlData' of class 'RenderManager'. Details: (since 1.92) - Instead use sap.ui.core.RenderManager#openStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/openStart) or sap.ui.core.RenderManager#voidStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/voidStart) of the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager) and pass the desired control data as the second parameter to the new API.
104:9 error Call to deprecated function 'write' of class 'RenderManager'. Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
108:9 error Call to deprecated function 'write' of class 'RenderManager'. Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
129:7 error Call to deprecated function 'write' of class 'RenderManager'. Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
/Users/marianzeis/DEV/<apppath>/webapp/control/DynamicCompartmentBoxItem.ts
142:12 error Call to deprecated function 'write' of class 'RenderManager'. Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
147:12 error Call to deprecated function 'writeControlData' of class 'RenderManager'. Details: (since 1.92) - Instead use sap.ui.core.RenderManager#openStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/openStart) or sap.ui.core.RenderManager#voidStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/voidStart) of the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager) and pass the desired control data as the second parameter to the new API.
167:16 error Call to deprecated function 'write' of class 'RenderManager'. Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
173:16 error Call to deprecated function 'write' of class 'RenderManager'. Details: (since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager). There is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML markup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to be split into the individual calls of the Semantic Rendering API.
/Users/marianzeis/DEV/<apppath>/webapp/localService/mockserver.js
16:34 error Use of deprecated API 'jQuery.sap.getUriParameters'. Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
17:33 error Use of deprecated API 'jQuery.sap.getModulePath'. Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
18:32 error Use of deprecated API 'jQuery.sap.getModulePath'. Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
22:29 error Use of deprecated API 'jQuery.sap.syncGetJSON'. Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
25:32 error Use of deprecated API 'jQuery.sap.getModulePath'. Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
81:13 error Use of deprecated API 'jQuery.sap.log.info'. Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
87:37 error Use of deprecated API 'jQuery.sap.getModulePath'. Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
100:37 error Use of deprecated API 'jQuery.sap.require'. Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
102:56 error Use of deprecated API 'jQuery.sap.sjax'. Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
107:62 error Use of deprecated API 'jQuery.sap.serializeXML'. Details: since 1.58. To avoid usage of global variables in general, please do not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities are replaced by alternative modules which can be found in the API doc.
/Users/marianzeis/DEV/<apppath>/webapp/util/Util.ts
24:23 error Access of global variable 'sap' (sap.ui.getCore)
24:30 error Call to deprecated function 'getCore' (sap.ui.getCore). Details: (since 1.118) - Please require 'sap/ui/core/Core' instead and use the module export directly without using 'new'."
24:40 error Call to deprecated function 'getConfiguration' of class 'Core'. Details: (since 1.120) - Please see Configuration (https://ui5.sap.com/1.120/#/api/sap.ui.core.Configuration) for the corrsponding replacements.
24:59 error Call to deprecated function 'getLanguage' of class 'Configuration'. Details: (since 1.119) - Please use Localization.getLanguage (https://ui5.sap.com/1.120/#/api/module:sap/base/i18n/Localization%23methods/sap/base/i18n/Localization.getLanguage)instead.
/Users/marianzeis/DEV/<apppath>/webapp/view/Source.view.xml
111:37 error Use of deprecated property 'useExportToExcel' of class 'SmartTable'. Details: (since 1.100) - replaced by `enableExport` property.
143:41 error Use of deprecated property 'visibleRowCount' of class 'TreeTable'. Details: (since 1.119) - use the `rowMode` aggregation instead.
143:61 error Use of deprecated property 'rootLevel' of class 'TreeTable'. Details: (since 1.76) - replaced by the `rootLevel` binding parameter. May not work with all bindings.
143:75 error Use of deprecated property 'expandFirstLevel' of class 'TreeTable'. Details: (since 1.46.3) - replaced by the `numberOfExpandedLevels` binding parameter. May not work with all bindings.
/Users/marianzeis/DEV/<apppath>/webapp/view/Target.view.xml
120:29 error Use of deprecated property 'visibleRowCount' of class 'TreeTable'. Details: (since 1.119) - use the `rowMode` aggregation instead.
/Users/marianzeis/DEV/<apppath>/webapp/view/TargetBadHU.view.xml
89:17 error Use of deprecated property 'visibleRowCount' of class 'Table'. Details: (since 1.119) - use the `rowMode` aggregation instead.
28 problems (28 errors, 0 warnings)
JSON output sample
[
{
"filePath": "webapp/util/Util.ts",
"messages": [
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 24,
"column": 59,
"message": "Call to deprecated function 'getLanguage' of class 'Configuration'",
"messageDetails": "(since 1.119) - Please use Localization.getLanguage (https://ui5.sap.com/1.120/#/api/module:sap/base/i18n/Localization%23methods/sap/base/i18n/Localization.getLanguage)instead."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 24,
"column": 40,
"message": "Call to deprecated function 'getConfiguration' of class 'Core'",
"messageDetails": "(since 1.120) - Please see Configuration (https://ui5.sap.com/1.120/#/api/sap.ui.core.Configuration) for the corrsponding\nreplacements."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 24,
"column": 30,
"message": "Call to deprecated function 'getCore' (sap.ui.getCore)",
"messageDetails": "(since 1.118) - Please require 'sap/ui/core/Core' instead and use the module export directly\nwithout using 'new'.\""
},
{
"ruleId": "ui5-linter-no-globals-js",
"severity": 2,
"line": 24,
"column": 23,
"message": "Access of global variable 'sap' (sap.ui.getCore)"
}
],
"errorCount": 4,
"warningCount": 0,
"fatalErrorCount": 0
},
{
"filePath": "webapp/view/TargetBadHU.view.xml",
"messages": [
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 89,
"column": 17,
"message": "Use of deprecated property 'visibleRowCount' of class 'Table'",
"messageDetails": "(since 1.119) - use the `rowMode` aggregation instead."
}
],
"errorCount": 1,
"warningCount": 0,
"fatalErrorCount": 0
},
{
"filePath": "webapp/view/Target.view.xml",
"messages": [
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 120,
"column": 29,
"message": "Use of deprecated property 'visibleRowCount' of class 'TreeTable'",
"messageDetails": "(since 1.119) - use the `rowMode` aggregation instead."
}
],
"errorCount": 1,
"warningCount": 0,
"fatalErrorCount": 0
},
{
"filePath": "webapp/view/Source.view.xml",
"messages": [
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 143,
"column": 41,
"message": "Use of deprecated property 'visibleRowCount' of class 'TreeTable'",
"messageDetails": "(since 1.119) - use the `rowMode` aggregation instead."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 143,
"column": 61,
"message": "Use of deprecated property 'rootLevel' of class 'TreeTable'",
"messageDetails": "(since 1.76) - replaced by the `rootLevel` binding parameter. May not work with all bindings."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 143,
"column": 75,
"message": "Use of deprecated property 'expandFirstLevel' of class 'TreeTable'",
"messageDetails": "(since 1.46.3) - replaced by the `numberOfExpandedLevels` binding parameter. May not work\nwith all bindings."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 111,
"column": 37,
"message": "Use of deprecated property 'useExportToExcel' of class 'SmartTable'",
"messageDetails": "(since 1.100) - replaced by `enableExport` property."
}
],
"errorCount": 4,
"warningCount": 0,
"fatalErrorCount": 0
},
{
"filePath": "webapp/localService/mockserver.js",
"messages": [
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 16,
"column": 34,
"message": "Use of deprecated API 'jQuery.sap.getUriParameters'",
"messageDetails": "since 1.58. To avoid usage of global variables in general, please\ndo not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities\nare replaced by alternative modules which can be found in the API doc."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 17,
"column": 33,
"message": "Use of deprecated API 'jQuery.sap.getModulePath'",
"messageDetails": "since 1.58. To avoid usage of global variables in general, please\ndo not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities\nare replaced by alternative modules which can be found in the API doc."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 18,
"column": 32,
"message": "Use of deprecated API 'jQuery.sap.getModulePath'",
"messageDetails": "since 1.58. To avoid usage of global variables in general, please\ndo not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities\nare replaced by alternative modules which can be found in the API doc."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 22,
"column": 29,
"message": "Use of deprecated API 'jQuery.sap.syncGetJSON'",
"messageDetails": "since 1.58. To avoid usage of global variables in general, please\ndo not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities\nare replaced by alternative modules which can be found in the API doc."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 25,
"column": 32,
"message": "Use of deprecated API 'jQuery.sap.getModulePath'",
"messageDetails": "since 1.58. To avoid usage of global variables in general, please\ndo not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities\nare replaced by alternative modules which can be found in the API doc."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 81,
"column": 13,
"message": "Use of deprecated API 'jQuery.sap.log.info'",
"messageDetails": "since 1.58. To avoid usage of global variables in general, please\ndo not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities\nare replaced by alternative modules which can be found in the API doc."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 87,
"column": 37,
"message": "Use of deprecated API 'jQuery.sap.getModulePath'",
"messageDetails": "since 1.58. To avoid usage of global variables in general, please\ndo not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities\nare replaced by alternative modules which can be found in the API doc."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 100,
"column": 37,
"message": "Use of deprecated API 'jQuery.sap.require'",
"messageDetails": "since 1.58. To avoid usage of global variables in general, please\ndo not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities\nare replaced by alternative modules which can be found in the API doc."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 102,
"column": 56,
"message": "Use of deprecated API 'jQuery.sap.sjax'",
"messageDetails": "since 1.58. To avoid usage of global variables in general, please\ndo not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities\nare replaced by alternative modules which can be found in the API doc."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 107,
"column": 62,
"message": "Use of deprecated API 'jQuery.sap.serializeXML'",
"messageDetails": "since 1.58. To avoid usage of global variables in general, please\ndo not use the jQuery.sap namespace any longer. Most of the jQuery.sap functionalities\nare replaced by alternative modules which can be found in the API doc."
}
],
"errorCount": 10,
"warningCount": 0,
"fatalErrorCount": 0
},
{
"filePath": "webapp/control/DynamicCompartmentBoxItem.ts",
"messages": [
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 142,
"column": 12,
"message": "Call to deprecated function 'write' of class 'RenderManager'",
"messageDetails": "(since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager).\nThere is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML\nmarkup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to\nbe split into the individual calls of the Semantic Rendering API."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 147,
"column": 12,
"message": "Call to deprecated function 'writeControlData' of class 'RenderManager'",
"messageDetails": "(since 1.92) - Instead use sap.ui.core.RenderManager#openStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/openStart) or sap.ui.core.RenderManager#voidStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/voidStart)\nof the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager) and pass the desired control data as\nthe second parameter to the new API."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 167,
"column": 16,
"message": "Call to deprecated function 'write' of class 'RenderManager'",
"messageDetails": "(since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager).\nThere is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML\nmarkup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to\nbe split into the individual calls of the Semantic Rendering API."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 173,
"column": 16,
"message": "Call to deprecated function 'write' of class 'RenderManager'",
"messageDetails": "(since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager).\nThere is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML\nmarkup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to\nbe split into the individual calls of the Semantic Rendering API."
}
],
"errorCount": 4,
"warningCount": 0,
"fatalErrorCount": 0
},
{
"filePath": "webapp/control/DynamicCompartmentBox.ts",
"messages": [
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 81,
"column": 7,
"message": "Call to deprecated function 'writeControlData' of class 'RenderManager'",
"messageDetails": "(since 1.92) - Instead use sap.ui.core.RenderManager#openStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/openStart) or sap.ui.core.RenderManager#voidStart (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager%23methods/voidStart)\nof the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager) and pass the desired control data as\nthe second parameter to the new API."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 104,
"column": 9,
"message": "Call to deprecated function 'write' of class 'RenderManager'",
"messageDetails": "(since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager).\nThere is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML\nmarkup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to\nbe split into the individual calls of the Semantic Rendering API."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 108,
"column": 9,
"message": "Call to deprecated function 'write' of class 'RenderManager'",
"messageDetails": "(since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager).\nThere is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML\nmarkup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to\nbe split into the individual calls of the Semantic Rendering API."
},
{
"ruleId": "ui5-linter-no-deprecated-api",
"severity": 2,
"line": 129,
"column": 7,
"message": "Call to deprecated function 'write' of class 'RenderManager'",
"messageDetails": "(since 1.92) - Instead, use the Semantic Rendering API (https://ui5.sap.com/1.120/#/api/sap.ui.core.RenderManager).\nThere is no 1:1 replacement for `write`. Typically, `write` is used to create a longer sequence of HTML\nmarkup (e.g. an element with attributes and children) in a single call. Such a markup sequence has to\nbe split into the individual calls of the Semantic Rendering API."
}
],
"errorCount": 4,
"warningCount": 0,
"fatalErrorCount": 0
}
]
Any reason why text path is the full path and json is relativ?:
Text: /Users/marianzeis/DEV/<apppath>/webapp/control/DynamicCompartmentBox.ts
JSON: webapp/control/DynamicCompartmentBox.ts
Thank you very much for this PR! We'll discuss it in the team and get back to you.
Any reason why text path is the full path and json is relativ?:
Text:
/Users/marianzeis/DEV/<apppath>/webapp/control/DynamicCompartmentBox.tsJSON:
webapp/control/DynamicCompartmentBox.ts
The full path in the text output allows you to jump directly to the finding in some IDEs. In VSCode for example, such paths will be rendered as a link that you can "ctrl+click" to open the file and even scroll to the correct position in the file.
Since the JSON output is not intended for direct consumption by developers but rather for automated reportings or statistics, we decided to keep the paths relative to save on file size and to not include potentially sensitive path segments from a developers local system.
ESLint always uses absolute paths in its output: https://eslint.org/docs/latest/use/formatters/#stylish
I reviewed the code already last week and have no objections. Regarding the paths I think we should format them relative to the project root.
In addition, we played around with the PR and found the formatting was not ideal in all cases. Especially when there are many findings in a single file, and some are warnings while others are errors (or fatal errors) we should think whether a sorting based on the severity (and then by position) makes sense.
I'm also unsure of the use of emojis for illustrating the severity. I believe the two circles 🟡 🔴 might be hard to distinguish for individuals with visual impairment.
We have an intern this summer (@konnraad) and tasked him with creating a table-version based on your PR, see below. He also added the mentioned sorting based on severity. Please let us know what you think:
Table output sample
UI5 Linter Report
Findings per File
ui5.yaml
| Severity | Position | Message | Details |
|---|---|---|---|
| Error | 12:7 |
Use of deprecated library 'sap.ui.commons' |
webapp/Component.js
| Severity | Position | Message | Details |
|---|---|---|---|
| Warning | 4:9 |
Component does not specify that it uses the descriptor via the manifest.json file | A manifest.json has been found in the same directory as the component. Although it will be used at runtime automatically, this should still be expressed in the metadata of the component class (https://ui5.sap.com/#/topic/0187ea5e2eff4166b0453b9dcc8fc64f). |
| Error | 1:75 |
Import of deprecated module 'sap/m/DateTimeInput' | (since 1.32.8) - replaced by sap.m.DatePicker (https://ui5.sap.com/1.120/#/api/sap.m.DatePicker), sap.m.TimePicker (https://ui5.sap.com/1.120/#/api/sap.m.TimePicker) or sap.m.DateTimePicker (https://ui5.sap.com/1.120/#/api/sap.m.DateTimePicker) |
webapp/controller/App.controller.js
| Severity | Position | Message | Details |
|---|---|---|---|
| Error | 7:2 |
Deprecated access to enum pseudo module 'sap/ui/core/BarColor' | Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4) |
| Error | 26:22 |
Access of global variable 'jQuery' (jQuery) | |
| Error | 27:32 |
Call to deprecated function 'control' (avatarDOM.control) | since 1.106, use sap.ui.core.Element.closestTo instead. |
| Error | 36:6 |
Use of deprecated property 'tap' of class 'Button' | (since 1.20) - replaced by press event |
| Error | 136:18 |
Access of global variable 'sap' (sap.ui.getCore) | |
| Error | 136:25 |
Call to deprecated function 'getCore' (sap.ui.getCore) | (since 1.118) - Please require 'sap/ui/core/Core' instead and use the module export directly without using 'new'." |
| Error | 136:35 |
Call to deprecated function 'byId' of class 'Core' | (since 1.119) - Please use Element.getElementById (https://ui5.sap.com/1.120/#/api/sap.ui.core.Element)instead. |
webapp/manifest.json
| Severity | Position | Message | Details |
|---|---|---|---|
| Error | 14:17 |
Use of deprecated library 'sap.ui.commons' |
webapp/view/App.view.xml
| Severity | Position | Message | Details |
|---|---|---|---|
| Error | 7:8 |
Import of deprecated module 'sap/f/Avatar' | (since 1.73) - Use the sap.m.Avatar (https://ui5.sap.com/1.120/#/api/sap.m.Avatar) instead. |
webapp/view/Demo.view.xml
| Severity | Position | Message | Details |
|---|---|---|---|
| Fatal Error | 0:0 |
Fatal error: Unknown namespace demo for tag App in resource /resources/sap/ui/demo/todo/view/Demo.view.xml |
Summary
- Total problems: 13
- Warnings: 1
- Errors: 12 (1 Fatal)
The drawback when using a table is that it's harder to read in plain-text or in the console output compared to your initial proposal. But we are not sure whether this is a valid use case for you anyways.
Should we focus on having a nice format in the rendered markdown or is the plain text format important as well? (CC: @marcelschork)
Looking forward to your feedback. Our intern is also standing by to make the necessary changes depending on what we agree on 😉
Hi Merlin, agree with all what you said. You said you would like to sort by error, in the example is warning on top, I guess error should be on top right? Other than that, I agree on better rendered output.
I actually don't have (yet) a use case for markdown. I actually tried to implement the ignore-file but that was harder than I thought. Because I already spent time getting into the code, I didn't want to waste that and found that issue from Marcel. This was just easier to implement.
I'm more then happy that @konnraad takes over.
Cheers
@RandomByte I very much like the table format because the readability is much better now (which is essential for PR decoration). I think if somebody choose the format option markdown it doesn't matter how the actual plain text output looks like. I also like the idea to sort by severity and then by position!
We moved the summary to the top. Sorting is now by severity (order: Fatal Errors, Errors, Warnings), then line, then column.
The output looks like this now:
Updated Table output sample
UI5 linter Report
Summary
13 problems (12 errors, 1 warnings)
1 fatal errors
Findings
ui5.yaml
| Severity | Line | Message | Details |
|---|---|---|---|
| Error | 12:7 |
Use of deprecated library 'sap.ui.commons' |
webapp/Component.js
| Severity | Line | Message | Details |
|---|---|---|---|
| Error | 1:75 |
Import of deprecated module 'sap/m/DateTimeInput' | (since 1.32.8) - replaced by sap.m.DatePicker (https://ui5.sap.com/1.120/#/api/sap.m.DatePicker), sap.m.TimePicker (https://ui5.sap.com/1.120/#/api/sap.m.TimePicker) or sap.m.DateTimePicker (https://ui5.sap.com/1.120/#/api/sap.m.DateTimePicker) |
| Warning | 4:9 |
Component does not specify that it uses the descriptor via the manifest.json file | A manifest.json has been found in the same directory as the component. Although it will be used at runtime automatically, this should still be expressed in the metadata of the component class (https://ui5.sap.com/#/topic/0187ea5e2eff4166b0453b9dcc8fc64f). |
webapp/controller/App.controller.js
| Severity | Line | Message | Details |
|---|---|---|---|
| Error | 7:2 |
Deprecated access to enum pseudo module 'sap/ui/core/BarColor' | Migrating Access to Pseudo Modules (https://ui5.sap.com/#/topic/00737d6c1b864dc3ab72ef56611491c4) |
| Error | 26:22 |
Access of global variable 'jQuery' (jQuery) | |
| Error | 27:32 |
Call to deprecated function 'control' (avatarDOM.control) | since 1.106, use sap.ui.core.Element.closestTo instead. |
| Error | 36:6 |
Use of deprecated property 'tap' of class 'Button' | (since 1.20) - replaced by press event |
| Error | 136:18 |
Access of global variable 'sap' (sap.ui.getCore) | |
| Error | 136:25 |
Call to deprecated function 'getCore' (sap.ui.getCore) | (since 1.118) - Please require 'sap/ui/core/Core' instead and use the module export directly without using 'new'." |
| Error | 136:35 |
Call to deprecated function 'byId' of class 'Core' | (since 1.119) - Please use Element.getElementById (https://ui5.sap.com/1.120/#/api/sap.ui.core.Element)instead. |
webapp/manifest.json
| Severity | Line | Message | Details |
|---|---|---|---|
| Error | 14:17 |
Use of deprecated library 'sap.ui.commons' |
webapp/view/App.view.xml
| Severity | Line | Message | Details |
|---|---|---|---|
| Error | 7:8 |
Import of deprecated module 'sap/f/Avatar' | (since 1.73) - Use the sap.m.Avatar (https://ui5.sap.com/1.120/#/api/sap.m.Avatar) instead. |
webapp/view/Demo.view.xml
| Severity | Line | Message | Details |
|---|---|---|---|
| Fatal Error | 0:0 |
Unknown namespace demo for tag App in resource /resources/sap/ui/demo/todo/view/Demo.view.xml |
@marianfoo we appreciate your opinion on the current state of this PR. If you are satisfied with the current state we will follow-up with the merge of the PR and produce a new release.
Released with https://github.com/SAP/ui5-linter/releases/tag/v0.3.4. Thanks a lot @marianfoo for your contribution!