You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detects global access to project-namespace modules which bypass
sap.ui.define/sap.ui.require. These were silently ignored by no-globals
since app namespaces have no type definitions.
This new detection generates linter messages with `ruleId`s
"no-project-globals".
JIRA: CPOUI5FOUNDATION-1242
---------
Co-authored-by: Max Reichmann <max.reichmann@sap.com>
# Snapshot report for `test/lib/linter/rules/NoProjectGlobals.ts`
2
+
3
+
The actual snapshot is saved in `NoProjectGlobals.ts.snap`.
4
+
5
+
Generated by [AVA](https://avajs.dev).
6
+
7
+
## General: NoProjectGlobals
8
+
9
+
> LintResult: NoProjectGlobals
10
+
11
+
[
12
+
{
13
+
coverageInfo: [
14
+
{
15
+
category: 1,
16
+
column: 2,
17
+
line: 12,
18
+
message: 'Unable to analyze this method call because the type of identifier "doSomething" in "Helper.doSomething()" could not be determined',
19
+
},
20
+
],
21
+
errorCount: 0,
22
+
fatalErrorCount: 0,
23
+
filePath: 'NoProjectGlobals_Negative.js',
24
+
messages: [],
25
+
warningCount: 0,
26
+
},
27
+
{
28
+
coverageInfo: [
29
+
{
30
+
category: 1,
31
+
column: 2,
32
+
line: 5,
33
+
message: 'Unable to analyze this method call because the type of identifier "format" in "com.example.app.utils.Formatter.format()" could not be determined',
34
+
},
35
+
{
36
+
category: 1,
37
+
column: 2,
38
+
line: 10,
39
+
message: 'Unable to analyze this method call because the type of identifier "doSomething" in "window.com.example.app.utils.Helper.doSomething()" could not be determined',
40
+
},
41
+
],
42
+
errorCount: 7,
43
+
fatalErrorCount: 0,
44
+
filePath: 'NoProjectGlobals.js',
45
+
messages: [
46
+
{
47
+
column: 2,
48
+
line: 5,
49
+
message: 'Access of global variable \'com\' (com.example.app.utils.Formatter.format)',
50
+
messageDetails: 'Do not use global variables to access UI5 projects. It might be necessary to modify the provider and consumer of this global variable. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
51
+
ruleId: 'no-project-globals',
52
+
severity: 2,
53
+
ui5TypeInfo: undefined,
54
+
},
55
+
{
56
+
column: 10,
57
+
line: 6,
58
+
message: 'Access of global variable \'com\' (com.example.app.model.Config)',
59
+
messageDetails: 'Do not use global variables to access UI5 projects. It might be necessary to modify the provider and consumer of this global variable. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
60
+
ruleId: 'no-project-globals',
61
+
severity: 2,
62
+
ui5TypeInfo: undefined,
63
+
},
64
+
{
65
+
column: 2,
66
+
line: 7,
67
+
message: 'Access of global variable \'com\' (com.example.app.utils.DataService)',
68
+
messageDetails: 'Do not use global variables to access UI5 projects. It might be necessary to modify the provider and consumer of this global variable. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
69
+
ruleId: 'no-project-globals',
70
+
severity: 2,
71
+
ui5TypeInfo: undefined,
72
+
},
73
+
{
74
+
column: 2,
75
+
line: 10,
76
+
message: 'Access of global variable \'com\' (window.com.example.app.utils.Helper.doSomething)',
77
+
messageDetails: 'Do not use global variables to access UI5 projects. It might be necessary to modify the provider and consumer of this global variable. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
78
+
ruleId: 'no-project-globals',
79
+
severity: 2,
80
+
ui5TypeInfo: undefined,
81
+
},
82
+
{
83
+
column: 10,
84
+
line: 11,
85
+
message: 'Access of global variable \'com\' (window.com.example.app.model.Settings)',
86
+
messageDetails: 'Do not use global variables to access UI5 projects. It might be necessary to modify the provider and consumer of this global variable. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
87
+
ruleId: 'no-project-globals',
88
+
severity: 2,
89
+
ui5TypeInfo: undefined,
90
+
},
91
+
{
92
+
column: 2,
93
+
line: 12,
94
+
message: 'Access of global variable \'com\' (window.com.example.app.utils.Registry)',
95
+
messageDetails: 'Do not use global variables to access UI5 projects. It might be necessary to modify the provider and consumer of this global variable. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
96
+
ruleId: 'no-project-globals',
97
+
severity: 2,
98
+
ui5TypeInfo: undefined,
99
+
},
100
+
{
101
+
column: 9,
102
+
line: 14,
103
+
message: 'Access of global variable \'com\' (com.example.app.utils.TestScripts)',
104
+
messageDetails: 'Do not use global variables to access UI5 projects. It might be necessary to modify the provider and consumer of this global variable. See Best Practices for Developers (https://ui5.sap.com/#/topic/28fcd55b04654977b63dacbee0552712)',
0 commit comments