roku_builder 4.11.5 → 4.12.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ffd251724f188c8710440227d48d0fb31cc0f06
4
- data.tar.gz: 52339a2234af9dfc1c18a845af63d641f33757b1
3
+ metadata.gz: 74f2329a8a90c780df24f64d8156a391124fc5f8
4
+ data.tar.gz: efdd1e7b9da657a361499bdff88e343b92f82987
5
5
  SHA512:
6
- metadata.gz: 276a907a465b253f1e6123c963256a27beca5fdc861297c7fe5cd230768fcb177d3c0421a47fabe80ef5b8708c53ef82420c3808e33e50222fc0806746391e56
7
- data.tar.gz: 73022fe69d67ef100e349cba86015bc2abfd5321422cb101cce4fac2cea0b7a9afff5a6a05500c5869bdb6b7d85b95ee3b67fbe64da66b77469fc7c250204588
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
- if /#{line_inspector[:regex]}/i.match(line)
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RokuBuilder
4
4
  # Version of the RokuBuilder Gem
5
- VERSION = "4.11.5"
5
+ VERSION = "4.12.0"
6
6
  end
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.11.5
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-09 00:00:00.000000000 Z
11
+ date: 2019-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip