roku_builder 4.17.1 → 4.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/CHANGELOG +4 -0
- data/lib/roku_builder/os.rb +23 -0
- data/lib/roku_builder/plugins/analyzer.rb +42 -26
- data/lib/roku_builder/plugins/line_inspector.rb +1 -4
- data/lib/roku_builder/plugins/sca-cmd/bin/sca-cmd +188 -0
- data/lib/roku_builder/plugins/sca-cmd/bin/sca-cmd.bat +100 -0
- data/lib/roku_builder/plugins/sca-cmd/lib/sca-cmd.jar +0 -0
- data/lib/roku_builder/version.rb +1 -1
- data/test/roku_builder/plugins/test_analyzer.rb +1 -269
- data/test/roku_builder/test_files/analyzer_test/manifest_depricated_attribute +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_duplicate_attribute +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_empty_value +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_has_value +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_incorrect_image_resolution +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_invalid_value_boolean +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_invalid_value_equals +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_invalid_value_float +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_invalid_value_hex +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_invalid_value_integer +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_invalid_value_negative +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_invalid_value_not_equal +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_invalid_value_starts_with +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_missing_attribute +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_missing_file +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_raf +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_sd_image_resolution +1 -0
- data/test/roku_builder/test_files/analyzer_test/manifest_template +1 -0
- data/test/roku_builder/test_files/analyzer_test/source/main.brs +40 -0
- metadata +8 -5
- data/lib/roku_builder/plugins/manifest_attributes.json +0 -224
- data/lib/roku_builder/plugins/manifest_inspector.rb +0 -150
- data/lib/roku_builder/plugins/raf_inspector.rb +0 -74
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: roku_builder
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.
|
4
|
+
version: 4.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- greeneca
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-05-
|
11
|
+
date: 2019-05-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rubyzip
|
@@ -483,6 +483,7 @@ files:
|
|
483
483
|
- lib/roku_builder/logger.rb
|
484
484
|
- lib/roku_builder/manifest.rb
|
485
485
|
- lib/roku_builder/options.rb
|
486
|
+
- lib/roku_builder/os.rb
|
486
487
|
- lib/roku_builder/plugin.rb
|
487
488
|
- lib/roku_builder/plugins/analyzer.rb
|
488
489
|
- lib/roku_builder/plugins/core.rb
|
@@ -492,14 +493,14 @@ files:
|
|
492
493
|
- lib/roku_builder/plugins/line_inspector.rb
|
493
494
|
- lib/roku_builder/plugins/linker.rb
|
494
495
|
- lib/roku_builder/plugins/loader.rb
|
495
|
-
- lib/roku_builder/plugins/manifest_attributes.json
|
496
|
-
- lib/roku_builder/plugins/manifest_inspector.rb
|
497
496
|
- lib/roku_builder/plugins/monitor.rb
|
498
497
|
- lib/roku_builder/plugins/navigator.rb
|
499
498
|
- lib/roku_builder/plugins/packager.rb
|
500
499
|
- lib/roku_builder/plugins/performance_config.json
|
501
500
|
- lib/roku_builder/plugins/profiler.rb
|
502
|
-
- lib/roku_builder/plugins/
|
501
|
+
- lib/roku_builder/plugins/sca-cmd/bin/sca-cmd
|
502
|
+
- lib/roku_builder/plugins/sca-cmd/bin/sca-cmd.bat
|
503
|
+
- lib/roku_builder/plugins/sca-cmd/lib/sca-cmd.jar
|
503
504
|
- lib/roku_builder/plugins/scripter.rb
|
504
505
|
- lib/roku_builder/plugins/tester.rb
|
505
506
|
- lib/roku_builder/stager.rb
|
@@ -548,6 +549,7 @@ files:
|
|
548
549
|
- test/roku_builder/test_files/analyzer_test/manifest_raf
|
549
550
|
- test/roku_builder/test_files/analyzer_test/manifest_sd_image_resolution
|
550
551
|
- test/roku_builder/test_files/analyzer_test/manifest_template
|
552
|
+
- test/roku_builder/test_files/analyzer_test/source/main.brs
|
551
553
|
- test/roku_builder/test_files/analyzer_test/test.pkg
|
552
554
|
- test/roku_builder/test_files/config_parser_test/test.pkg
|
553
555
|
- test/roku_builder/test_files/config_test/bad.json
|
@@ -675,6 +677,7 @@ test_files:
|
|
675
677
|
- test/roku_builder/test_files/analyzer_test/manifest_raf
|
676
678
|
- test/roku_builder/test_files/analyzer_test/manifest_sd_image_resolution
|
677
679
|
- test/roku_builder/test_files/analyzer_test/manifest_template
|
680
|
+
- test/roku_builder/test_files/analyzer_test/source/main.brs
|
678
681
|
- test/roku_builder/test_files/analyzer_test/test.pkg
|
679
682
|
- test/roku_builder/test_files/config_parser_test/test.pkg
|
680
683
|
- test/roku_builder/test_files/config_test/bad.json
|
@@ -1,224 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"title": {
|
3
|
-
"required": true
|
4
|
-
},
|
5
|
-
"major_version": {
|
6
|
-
"required": true,
|
7
|
-
"validations": {
|
8
|
-
"integer": true,
|
9
|
-
"non_negative": true
|
10
|
-
}
|
11
|
-
},
|
12
|
-
"minor_version": {
|
13
|
-
"required": true,
|
14
|
-
"validations": {
|
15
|
-
"integer": true,
|
16
|
-
"non_negative": true
|
17
|
-
}
|
18
|
-
},
|
19
|
-
"build_version": {
|
20
|
-
"required": true,
|
21
|
-
"validations": {
|
22
|
-
"integer": true,
|
23
|
-
"non_negative": true,
|
24
|
-
"not_equal": ["0"]
|
25
|
-
}
|
26
|
-
},
|
27
|
-
"mm_icon_focus_hd": {
|
28
|
-
"required": true,
|
29
|
-
"validations": {
|
30
|
-
"starts_with": "pkg:/"
|
31
|
-
},
|
32
|
-
"isResource": true,
|
33
|
-
"resolution": [336, 210]
|
34
|
-
},
|
35
|
-
"mm_icon_focus_sd": {
|
36
|
-
"required": true
|
37
|
-
},
|
38
|
-
"splash_screen_fhd": {
|
39
|
-
"validations": {
|
40
|
-
"starts_with": "pkg:/"
|
41
|
-
},
|
42
|
-
"isResource": true,
|
43
|
-
"resolution": [1920, 1080]
|
44
|
-
},
|
45
|
-
"splash_screen_hd": {
|
46
|
-
"required": true,
|
47
|
-
"validations": {
|
48
|
-
"starts_with": "pkg:/"
|
49
|
-
},
|
50
|
-
"isResource": true,
|
51
|
-
"resolution": [1280, 720]
|
52
|
-
},
|
53
|
-
"splash_screen_sd": {
|
54
|
-
"required": true,
|
55
|
-
"validations": {
|
56
|
-
"starts_with": "pkg:/"
|
57
|
-
},
|
58
|
-
"isResource": true,
|
59
|
-
"resolution": [720, 480]
|
60
|
-
},
|
61
|
-
"splash_color": {
|
62
|
-
"validations": {
|
63
|
-
"hex": true
|
64
|
-
}
|
65
|
-
},
|
66
|
-
"splash_min_time": {
|
67
|
-
"validations": {
|
68
|
-
"integer": true,
|
69
|
-
"non_negative": true
|
70
|
-
}
|
71
|
-
},
|
72
|
-
"splash_rgs_optimization": {
|
73
|
-
"validations": {
|
74
|
-
"integer": true,
|
75
|
-
"non_negative": true
|
76
|
-
}
|
77
|
-
},
|
78
|
-
"ui_resolutions": {},
|
79
|
-
"uri_resolution_autosub": {},
|
80
|
-
"supports_input_launch": {
|
81
|
-
"validations": {
|
82
|
-
"integer": true,
|
83
|
-
"non_negative": true
|
84
|
-
}
|
85
|
-
},
|
86
|
-
"requires_audiometadata": {
|
87
|
-
"validations": {
|
88
|
-
"integer": true,
|
89
|
-
"non_negative": true
|
90
|
-
}
|
91
|
-
},
|
92
|
-
"requires_gaming_remote": {
|
93
|
-
"validations": {
|
94
|
-
"integer": true,
|
95
|
-
"non_negative": true
|
96
|
-
}
|
97
|
-
},
|
98
|
-
"requires_mkv": {
|
99
|
-
"validations": {
|
100
|
-
"integer": true,
|
101
|
-
"non_negative": true
|
102
|
-
}
|
103
|
-
},
|
104
|
-
"network_not_required": {
|
105
|
-
"validations": {
|
106
|
-
"integer": true,
|
107
|
-
"non_negative": true
|
108
|
-
}
|
109
|
-
},
|
110
|
-
"bs_libs_required": {},
|
111
|
-
"usb_media_handler": {
|
112
|
-
"validations": {
|
113
|
-
"integer": true,
|
114
|
-
"non_negative": true
|
115
|
-
}
|
116
|
-
},
|
117
|
-
"requires_aaxs_drm": {
|
118
|
-
"validations": {
|
119
|
-
"integer": true,
|
120
|
-
"non_negative": true
|
121
|
-
}
|
122
|
-
},
|
123
|
-
"requires_aaxs_drm": {
|
124
|
-
"validations": {
|
125
|
-
"integer": true,
|
126
|
-
"non_negative": true
|
127
|
-
}
|
128
|
-
},
|
129
|
-
"requires_aaxs_version": {
|
130
|
-
"validations": {
|
131
|
-
"float": true,
|
132
|
-
"non_negative": true
|
133
|
-
}
|
134
|
-
},
|
135
|
-
"requires_verimatrix_drm": {
|
136
|
-
"validations": {
|
137
|
-
"integer": true,
|
138
|
-
"non_negative": true
|
139
|
-
}
|
140
|
-
},
|
141
|
-
"requires_verimatrix_version": {
|
142
|
-
"validations": {
|
143
|
-
"float": true,
|
144
|
-
"non_negative": true
|
145
|
-
}
|
146
|
-
},
|
147
|
-
"hidden": {
|
148
|
-
"validations": {
|
149
|
-
"integer": true,
|
150
|
-
"non_negative": true
|
151
|
-
}
|
152
|
-
},
|
153
|
-
"playonly_aware": {
|
154
|
-
"validations": {
|
155
|
-
"integer": true,
|
156
|
-
"non_negative": true
|
157
|
-
}
|
158
|
-
},
|
159
|
-
"rsg_version": {
|
160
|
-
"validations": {
|
161
|
-
"float": true,
|
162
|
-
"non_negative": true
|
163
|
-
},
|
164
|
-
"notify": ["1.0"]
|
165
|
-
},
|
166
|
-
"automatic_audio_guide_disabled": {
|
167
|
-
"validations": {
|
168
|
-
"integer": true,
|
169
|
-
"non_negative": true
|
170
|
-
}
|
171
|
-
},
|
172
|
-
"bs_prof_enabled": {
|
173
|
-
"validations": {
|
174
|
-
"boolean": true
|
175
|
-
}
|
176
|
-
},
|
177
|
-
"bs_prof_sample_ratio": {
|
178
|
-
"validations": {
|
179
|
-
"float": true,
|
180
|
-
"non_negative": true
|
181
|
-
}
|
182
|
-
},
|
183
|
-
"confirm_partner_button": {
|
184
|
-
"validations": {
|
185
|
-
"integer": true,
|
186
|
-
"non_negative": true
|
187
|
-
}
|
188
|
-
},
|
189
|
-
"suppress_unconnected_hud":{
|
190
|
-
"validations": {
|
191
|
-
"equals": ["0", "1"]
|
192
|
-
}
|
193
|
-
},
|
194
|
-
"screensaver_title": {},
|
195
|
-
"screensaver_private":{
|
196
|
-
"validations": {
|
197
|
-
"equals": ["0", "1"]
|
198
|
-
}
|
199
|
-
},
|
200
|
-
"subtitle": {
|
201
|
-
"deprecated": true
|
202
|
-
},
|
203
|
-
"mm_icon_side_hd": {
|
204
|
-
"deprecated": true,
|
205
|
-
"validations": {
|
206
|
-
"starts_with": "pkg:/"
|
207
|
-
},
|
208
|
-
"isResource": true
|
209
|
-
},
|
210
|
-
"mm_icon_side_sd": {
|
211
|
-
"deprecated": true,
|
212
|
-
"validations": {
|
213
|
-
"starts_with": "pkg:/"
|
214
|
-
},
|
215
|
-
"isResource": true
|
216
|
-
},
|
217
|
-
"requires_bluetooth": {
|
218
|
-
"deprecated": true,
|
219
|
-
"validations": {
|
220
|
-
"integer": true,
|
221
|
-
"non_negative": true
|
222
|
-
}
|
223
|
-
}
|
224
|
-
}
|
@@ -1,150 +0,0 @@
|
|
1
|
-
# ********** Copyright Viacom, Inc. Apache 2.0 **********
|
2
|
-
|
3
|
-
module RokuBuilder
|
4
|
-
|
5
|
-
class ManifestInspector
|
6
|
-
def initialize(config:, dir:, raf:)
|
7
|
-
@config = config
|
8
|
-
@dir = dir
|
9
|
-
@raf_inspector = raf
|
10
|
-
end
|
11
|
-
|
12
|
-
def run(inspector_config)
|
13
|
-
@warnings = []
|
14
|
-
@attributes = {}
|
15
|
-
@line_numbers = {}
|
16
|
-
@inspector_config = inspector_config
|
17
|
-
manifest = File.join(@config.root_dir, "manifest")
|
18
|
-
unless File.exist?(manifest)
|
19
|
-
add_warning(warning: :packageManifestFile)
|
20
|
-
else
|
21
|
-
File.open(manifest) do |file|
|
22
|
-
current_line = 0
|
23
|
-
file.readlines.each do |line|
|
24
|
-
current_line += 1
|
25
|
-
parts = line.split("=")
|
26
|
-
key = parts.shift.to_sym
|
27
|
-
if @attributes[key]
|
28
|
-
add_warning(warning: :manifestDuplicateAttribute, key: key, line: current_line)
|
29
|
-
else
|
30
|
-
value = parts.join("=").chomp
|
31
|
-
if !value or value == ""
|
32
|
-
add_warning(warning: :manifestEmptyValue, key: key, line: current_line)
|
33
|
-
else
|
34
|
-
@attributes[key] = value
|
35
|
-
@line_numbers[key] = current_line
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
end
|
40
|
-
manifest_attributes.each_pair do |key, attribute_config|
|
41
|
-
if @attributes[key]
|
42
|
-
if attribute_config[:deprecated]
|
43
|
-
add_warning(warning: :manifestDeprecatedAttribute, key: key)
|
44
|
-
end
|
45
|
-
if attribute_config[:validations]
|
46
|
-
attribute_config[:validations].each_pair do |type, value|
|
47
|
-
case type
|
48
|
-
when :integer
|
49
|
-
unless "%0#{@attributes[key].length}i" % @attributes[key].to_i == @attributes[key]
|
50
|
-
add_warning(warning: :manifestInvalidValue, key: key)
|
51
|
-
end
|
52
|
-
when :hex
|
53
|
-
unless @attributes[key][0] == "#" and !@attributes[key][1..-1][/\H/]
|
54
|
-
add_warning(warning: :manifestInvalidValue, key: key)
|
55
|
-
end
|
56
|
-
when :float
|
57
|
-
unless @attributes[key].to_f.to_s == @attributes[key]
|
58
|
-
add_warning(warning: :manifestInvalidValue, key: key)
|
59
|
-
end
|
60
|
-
when :boolean
|
61
|
-
unless ["false", "true"].include? @attributes[key]
|
62
|
-
add_warning(warning: :manifestInvalidValue, key: key)
|
63
|
-
end
|
64
|
-
when :non_negative
|
65
|
-
unless @attributes[key].to_f >= 0
|
66
|
-
add_warning(warning: :manifestInvalidValue, key: key)
|
67
|
-
end
|
68
|
-
when :not_equal
|
69
|
-
if value.include? @attributes[key]
|
70
|
-
add_warning(warning: :manifestInvalidValue, key: key)
|
71
|
-
end
|
72
|
-
when :equals
|
73
|
-
unless value.include? @attributes[key]
|
74
|
-
add_warning(warning: :manifestInvalidValue, key: key)
|
75
|
-
end
|
76
|
-
when :starts_with
|
77
|
-
unless @attributes[key].start_with? value
|
78
|
-
add_warning(warning: :manifestInvalidValue, key: key)
|
79
|
-
end
|
80
|
-
else
|
81
|
-
raise ImplementationError, "Unknown Validation #{type}"
|
82
|
-
end
|
83
|
-
end
|
84
|
-
end
|
85
|
-
if attribute_config[:notify]
|
86
|
-
attribute_config[:notify].each do |regexp|
|
87
|
-
if /#{regexp}/ =~ @attributes[key]
|
88
|
-
add_warning(warning: :manifestHasValue, key: key)
|
89
|
-
break
|
90
|
-
end
|
91
|
-
end
|
92
|
-
end
|
93
|
-
if attribute_config[:isResource]
|
94
|
-
path = File.join(@dir, @attributes[key].gsub("pkg:/", ""))
|
95
|
-
unless File.exist?(path)
|
96
|
-
mapping = {"{0}": @attributes[key], "{1}": key }
|
97
|
-
add_warning(warning: :manifestMissingFile, key: key, mapping: mapping)
|
98
|
-
else
|
99
|
-
if attribute_config[:resolution]
|
100
|
-
size = ImageSize.path(path).size
|
101
|
-
target = ImageSize::Size.new(attribute_config[:resolution])
|
102
|
-
unless size == target
|
103
|
-
mapping = {
|
104
|
-
"{0}": @attributes[key],
|
105
|
-
"{1}": key,
|
106
|
-
"{2}": size,
|
107
|
-
"{3}": target
|
108
|
-
}
|
109
|
-
add_warning(warning: :manifestIncorrectImageResolution, key: key, mapping: mapping)
|
110
|
-
end
|
111
|
-
end
|
112
|
-
end
|
113
|
-
end
|
114
|
-
elsif attribute_config[:required]
|
115
|
-
add_warning(warning: :manifestMissingAttribute, key: key)
|
116
|
-
end
|
117
|
-
@raf_inspector.inspect_manifest(attributes: @attributes, line_numbers: @line_numbers)
|
118
|
-
end
|
119
|
-
end
|
120
|
-
@warnings
|
121
|
-
end
|
122
|
-
|
123
|
-
private
|
124
|
-
|
125
|
-
def manifest_attributes
|
126
|
-
file = File.join(File.dirname(__FILE__), "manifest_attributes.json")
|
127
|
-
JSON.parse(File.open(file).read, {symbolize_names: true})
|
128
|
-
end
|
129
|
-
|
130
|
-
def add_warning(warning:, key: nil, mapping: nil, line: nil)
|
131
|
-
@warnings.push(@inspector_config[warning].deep_dup)
|
132
|
-
@warnings.last[:path] = "manifest"
|
133
|
-
if line
|
134
|
-
@warnings.last[:line] = line
|
135
|
-
elsif @line_numbers[key]
|
136
|
-
@warnings.last[:line] = @line_numbers[key]
|
137
|
-
end
|
138
|
-
if mapping
|
139
|
-
mapping.each_pair do |map, value|
|
140
|
-
@warnings.last[:message].gsub!(map.to_s, value.to_s)
|
141
|
-
end
|
142
|
-
elsif key
|
143
|
-
@warnings.last[:message].gsub!("{0}", key.to_s)
|
144
|
-
if @attributes[key]
|
145
|
-
@warnings.last[:message].gsub!("{1}", @attributes[key])
|
146
|
-
end
|
147
|
-
end
|
148
|
-
end
|
149
|
-
end
|
150
|
-
end
|
@@ -1,74 +0,0 @@
|
|
1
|
-
# ********** Copyright Viacom, Inc. Apache 2.0 **********
|
2
|
-
|
3
|
-
module RokuBuilder
|
4
|
-
|
5
|
-
class RafInspector
|
6
|
-
RAF_INTERFACE_INITIALIZATION_PATTERN = /roku_ads\(\)/i
|
7
|
-
LIBRARY_IMPORT_PATTERN = /\s*library\s*"roku_ads.brs"\s*/i
|
8
|
-
|
9
|
-
def initialize(config:, dir:)
|
10
|
-
@config = config
|
11
|
-
@dir = dir
|
12
|
-
@has_raf_interface_initialization = false
|
13
|
-
@interface_location = {}
|
14
|
-
@has_library_import = false
|
15
|
-
@import_location = {}
|
16
|
-
@has_manifest_entry = false
|
17
|
-
@manifest_location = {path: "manifest"}
|
18
|
-
end
|
19
|
-
|
20
|
-
def inspect_line(line:, file:, line_number:)
|
21
|
-
unless @has_raf_interface_initialization
|
22
|
-
@has_raf_interface_initialization = !!RAF_INTERFACE_INITIALIZATION_PATTERN.match(line)
|
23
|
-
if @has_raf_interface_initialization
|
24
|
-
@interface_location = {path: file, line: line_number}
|
25
|
-
end
|
26
|
-
end
|
27
|
-
unless @has_library_import
|
28
|
-
@has_library_import = !!LIBRARY_IMPORT_PATTERN.match(line)
|
29
|
-
if @has_library_import
|
30
|
-
@import_location = {path: file, line: line_number}
|
31
|
-
end
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
def inspect_manifest(attributes:, line_numbers:)
|
36
|
-
if attributes[:bs_libs_required] and attributes[:bs_libs_required].downcase == "roku_ads_lib"
|
37
|
-
@has_manifest_entry = true
|
38
|
-
@manifest_location[:line] = line_numbers[:bs_libs_required]
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
def run(inspector_config)
|
43
|
-
@warnings = []
|
44
|
-
@inspector_config = inspector_config
|
45
|
-
if @has_raf_interface_initialization and !@has_library_import
|
46
|
-
add_warning(warning: :rafConstructorPresentImportMissing, location: @interface_location)
|
47
|
-
end
|
48
|
-
if @has_raf_interface_initialization and !@has_manifest_entry
|
49
|
-
add_warning(warning: :rafConstructorPresentManifestMissing, location: @interface_location)
|
50
|
-
end
|
51
|
-
if !@has_raf_interface_initialization and @has_manifest_entry
|
52
|
-
add_warning(warning: :rafConstructorMissingManifestPresent, location: @manifest_location)
|
53
|
-
end
|
54
|
-
if @has_manifest_entry and !@has_library_import
|
55
|
-
add_warning(warning: :rafManifestPresentImportMissing, location: @manifest_location)
|
56
|
-
end
|
57
|
-
if !@has_raf_interface_initialization and @has_library_import
|
58
|
-
add_warning(warning: :rafConstructorMissingImportPresent, location: @import_location)
|
59
|
-
end
|
60
|
-
if @has_raf_interface_initialization and @has_library_import and @has_manifest_entry
|
61
|
-
add_warning(warning: :rafProperIntegration, location: @import_location)
|
62
|
-
end
|
63
|
-
@warnings
|
64
|
-
end
|
65
|
-
|
66
|
-
private
|
67
|
-
|
68
|
-
def add_warning(warning:, location:)
|
69
|
-
@warnings.push(@inspector_config[warning].deep_dup)
|
70
|
-
@warnings.last[:path] = location[:path]
|
71
|
-
@warnings.last[:line] = location[:line]
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|