roku_builder 4.11.5 → 4.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 74f2329a8a90c780df24f64d8156a391124fc5f8
|
|
4
|
+
data.tar.gz: efdd1e7b9da657a361499bdff88e343b92f82987
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bdca635f7016274f459852d658b8aca178ff24e4bf9e0a26cf5a45f16aa0178589aba33255e7fd2fc2f04696a4e207ba99eec8a6cacc9fcffd6c8198e2016349
|
|
7
|
+
data.tar.gz: efa290a42ba6ff078c966246581fee980775b735f013b231d0a346bea4cf4a994c8a1f3b243558c75c3999c13426571ca79122555406f847ded042a4c1fe198d
|
|
@@ -32,6 +32,7 @@ module RokuBuilder
|
|
|
32
32
|
@warnings = []
|
|
33
33
|
analyzer_config = get_config("inspector_config.json")
|
|
34
34
|
performance_config = get_config("performance_config.json")
|
|
35
|
+
linter_config = get_config(".roku_builder_linter.json", true)
|
|
35
36
|
@inspector_config = analyzer_config[:inspectors]
|
|
36
37
|
loader = Loader.new(config: @config)
|
|
37
38
|
Dir.mktmpdir do |dir|
|
|
@@ -48,6 +49,7 @@ module RokuBuilder
|
|
|
48
49
|
if File.file?(file_path) and file_path.end_with?(".brs", ".xml")
|
|
49
50
|
line_inspector_config = analyzer_config[:lineInspectors]
|
|
50
51
|
line_inspector_config += performance_config
|
|
52
|
+
line_inspector_config += linter_config if linter_config
|
|
51
53
|
line_inspector = LineInspector.new(config: @config, raf: raf_inspector, inspector_config: line_inspector_config)
|
|
52
54
|
@warnings.concat(line_inspector.run(file_path))
|
|
53
55
|
end
|
|
@@ -29,9 +29,15 @@ module RokuBuilder
|
|
|
29
29
|
in_xml_comment = true if line.gsub!(/<!--.*/, "")
|
|
30
30
|
end
|
|
31
31
|
@inspector_config.each do |line_inspector|
|
|
32
|
-
|
|
32
|
+
match = nil
|
|
33
|
+
if line_inspector[:case_sensitive]
|
|
34
|
+
match = /#{line_inspector[:regex]}/.match(line)
|
|
35
|
+
else
|
|
36
|
+
match = /#{line_inspector[:regex]}/i.match(line)
|
|
37
|
+
end
|
|
38
|
+
if match
|
|
33
39
|
unless /'.*ignore-warning/i.match(full_line)
|
|
34
|
-
add_warning(inspector: line_inspector, file: file_path, line: line_number)
|
|
40
|
+
add_warning(inspector: line_inspector, file: file_path, line: line_number, match: match)
|
|
35
41
|
end
|
|
36
42
|
end
|
|
37
43
|
end
|
|
@@ -44,10 +50,11 @@ module RokuBuilder
|
|
|
44
50
|
|
|
45
51
|
private
|
|
46
52
|
|
|
47
|
-
def add_warning(inspector:, file:, line:)
|
|
53
|
+
def add_warning(inspector:, file:, line:, match: )
|
|
48
54
|
@warnings.push(inspector.deep_dup)
|
|
49
55
|
@warnings.last[:path] = file
|
|
50
56
|
@warnings.last[:line] = line
|
|
57
|
+
@warnings.last[:match] = match
|
|
51
58
|
end
|
|
52
59
|
end
|
|
53
60
|
end
|
data/lib/roku_builder/version.rb
CHANGED
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.12.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-01-
|
|
11
|
+
date: 2019-01-11 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rubyzip
|