roku_builder 4.21.0 → 4.21.1

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
  SHA256:
3
- metadata.gz: 3ce5f56708c07ff3b1690b2125647bba2ef48c9f7c3d04b8ee04c73e2ae0f88e
4
- data.tar.gz: 0c7ef6e883ef6f4c83e0fb9d72f5337e4e8151624eda7504cc8fc89e0635586e
3
+ metadata.gz: 14e0e8c8c442ff787f466072df4d0ada2940af2211b912fc34483de1a4240dd2
4
+ data.tar.gz: 3a080babe3d406b62aace4a74ae296f017f46ce43e9eb39d33c8ccaf0fdb16e1
5
5
  SHA512:
6
- metadata.gz: 1bbc6bcd38b8c8b473acde3883b8bc2b10bfa3b6608cf12d3b225edfcf0ace7093d2763617e2cb4a1db80f73a46334a289733b16cd4077800fa12292a3816d0d
7
- data.tar.gz: c26c9d1586391b35fdda16290d3ca98218f9dc78ee84ba974033f3b4ad1ad349ba9b753e415c3628e18160366af3baa1bd6ca0f03fec07255abb216a74d00745
6
+ metadata.gz: ec5169d5a364464d2c5497af55220501d467625fd89e0bd87af25db03d00ff3c61f6571782ea6267089218e5f57404a33df63fb2bb49d5b8538ee95a24d79c16
7
+ data.tar.gz: 7a99072769cf9433d2223b88ed4443ce0be2018a90b5b8c4e38ca37ef93629f926551c00ce99408caf7e014e8fff45c2d08de3df838a1a0e4c58bbdc06914883
data/CHANGELOG CHANGED
@@ -1,3 +1,7 @@
1
+ = 4.20.1 =
2
+
3
+ -Add indent-ignore and indent-reset comment processing to analyzer
4
+
1
5
  = 4.20.0 =
2
6
 
3
7
  - Add file size warning
@@ -14,10 +14,10 @@ module RokuBuilder
14
14
  end
15
15
 
16
16
  def check_line(line:, number:)
17
- #byebug if number == 191 and @path.ends_with?("EpisodeGuide.animation.brs")
17
+ #byebug if number == 43 and @path.ends_with?("keyEvents.brs")
18
18
  set_indentation(line: line)
19
19
  regexp = /^#{@character}{#{@ind}}[^#{@character}]/
20
- unless line =~ regexp or line == "\n"
20
+ unless line =~ regexp or line == "\n" or line =~ /\'indent-ignore/
21
21
  add_warning(line: number)
22
22
  end
23
23
  @prev_line = line
@@ -37,33 +37,37 @@ module RokuBuilder
37
37
  end
38
38
  end
39
39
  when :brs
40
- if @prev_line
41
- if @prev_line =~ /^\'/
42
- # Don't change indentation
43
- elsif @prev_line =~ /[\{\[\(:]$/
44
- @ind += @count
45
- elsif @prev_line =~ /:\s*\bfunction\b|:\s*\bsub\b/i
46
- @ind += @count
47
- elsif @prev_line =~ /^\s*\bfunction\b|^\s*\bsub\b/i
48
- @ind += @count
49
- elsif @prev_line =~ /^\s*#?if\b|^\s*#?else\b/i
50
- unless @prev_line =~ /\bthen\b[ \t ]*[^' \r\n']+.*$/i or @prev_line =~ /\breturn\b/i
40
+ if line =~ /'indent-reset/
41
+ @ind = line.index(/[^#{@character}]/)
42
+ else
43
+ if @prev_line
44
+ if @prev_line =~ /^\'/ or @prev_line =~ /\'indent-ignore/
45
+ # Don't change indentation
46
+ elsif @prev_line =~ /[\{\[\(:]$/
47
+ @ind += @count
48
+ elsif @prev_line =~ /:\s*\bfunction\b|:\s*\bsub\b/i
49
+ @ind += @count
50
+ elsif @prev_line =~ /^\s*\bfunction\b|^\s*\bsub\b/i
51
+ @ind += @count
52
+ elsif @prev_line =~ /^\s*#?if\b|^\s*#?else\b/i
53
+ unless @prev_line =~ /\bthen\b[ \t ]*[^' \r\n']+.*$/i or @prev_line =~ /\breturn\b/i
54
+ @ind += @count
55
+ end
56
+ elsif @prev_line =~ /^\s*\bfor\b|^\s*\bwhile\b/i
51
57
  @ind += @count
52
58
  end
53
- elsif @prev_line =~ /^\s*\bfor\b|^\s*\bwhile\b/i
54
- @ind += @count
55
59
  end
56
- end
57
- if line =~ /^\'/
58
- # Don't change indentation
59
- elsif line =~ /^\s*[\}\]\)]/
60
- @ind -= @count
61
- elsif line =~ /^\s*\bfunction\b|^\s*\bsub\b/i
62
- @ind -= 0
63
- elsif line =~ /^\s*:?\s*#?end\b|^\s*#?endif\b|^\s*endfor\b|^\s*\bnext\b/i
64
- @ind -= @count
65
- elsif line =~ /^\s*#?else\b|^\s*elseif\b/i
66
- @ind -= @count
60
+ if line =~ /^\'/ or line =~ /\'indent-ignore/
61
+ # Don't change indentation
62
+ elsif line =~ /^\s*[\}\]\)]/
63
+ @ind -= @count
64
+ elsif line =~ /^\s*\bfunction\b|^\s*\bsub\b/i
65
+ @ind -= 0
66
+ elsif line =~ /^\s*:?\s*#?end\b|^\s*#?endif\b|^\s*endfor\b|^\s*\bnext\b/i
67
+ @ind -= @count
68
+ elsif line =~ /^\s*#?else\b|^\s*elseif\b/i
69
+ @ind -= @count
70
+ end
67
71
  end
68
72
  end
69
73
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  module RokuBuilder
4
4
  # Version of the RokuBuilder Gem
5
- VERSION = "4.21.0"
5
+ VERSION = "4.21.1"
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.21.0
4
+ version: 4.21.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - greeneca
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-08-01 00:00:00.000000000 Z
11
+ date: 2019-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubyzip