bashcov 1.8.0 → 1.8.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
- SHA1:
3
- metadata.gz: 663e369ac45484a1d8df36ec47520edc2a5bd5b5
4
- data.tar.gz: 3016f906c0b63a1c8d9125c32c197cb1a44bf7f1
2
+ SHA256:
3
+ metadata.gz: 5f7a8a7c155fad81c5018015053083c015dbadfec694178e3f5ca40bc2811e93
4
+ data.tar.gz: 9adb13322f197aae9963ae90701ff24ed40f9b2473c9410f687c481592dbe387
5
5
  SHA512:
6
- metadata.gz: f977398907a51277dbca731ce8351c366324d13b4df904ffbf369bd49ec2f1d08c2417a3d9c5f7667822a7e0bc2ab2cba60c3eb708dddeb291d0144e6a231819
7
- data.tar.gz: 9e122bfd8679f6422b2c974d4afb990a567662c8279f3d6d4ec709521ffbb61530890ea8ccc9a65da72b9e2758b742172e126d22ca903117f461311aa8515a8c
6
+ metadata.gz: '079bfd802290a486b23cce687c2ee0f5a8f255a82bc1f604b426aa469828009b110aa431ae85d8570c3ccc013d6eb948cbcb0b8a0e3a01f5f94c01dea8edf449'
7
+ data.tar.gz: a931f8ba4a96ce8b92f4b977b48e2ee34c3b125b5ecebb2f78662f6f133559814ea748ac4c0ea60d57650239080588fc521098b8c2a260adf9f40e8bde156b4d
data/CHANGELOG.md CHANGED
@@ -1,7 +1,11 @@
1
- ## Unreleased ([changes](https://github.com/infertux/bashcov/compare/v1.8.0...master))
1
+ ## Unreleased ([changes](https://github.com/infertux/bashcov/compare/v1.8.1...master))
2
2
 
3
3
  * TBD
4
4
 
5
+ ## v1.8.1, 2018-03-01 ([changes](https://github.com/infertux/bashcov/compare/v1.8.0...v1.8.1))
6
+
7
+ * [BUGFIX] Fix incorrect coverage for some multiline strings (#35)
8
+
5
9
  ## v1.8.0, 2018-01-13 ([changes](https://github.com/infertux/bashcov/compare/v1.7.0...v1.8.0))
6
10
 
7
11
  * [FEATURE] Merge coverage results from multiple runs when
data/lib/bashcov/lexer.rb CHANGED
@@ -27,10 +27,17 @@ module Bashcov
27
27
 
28
28
  # Process and complete initial coverage.
29
29
  # @return [void]
30
- def complete_coverage
30
+ def complete_coverage # rubocop:disable Metrics/MethodLength
31
31
  lines = IO.read(@filename).encode("utf-8", invalid: :replace).lines
32
32
 
33
33
  lines.each_with_index do |line, lineno|
34
+ # multi-line arrays
35
+ mark_multiline(
36
+ lines, lineno,
37
+ /\A[^\n]*\b=\([^()]*\)/,
38
+ forward: false
39
+ )
40
+
34
41
  # heredoc
35
42
  mark_multiline(
36
43
  lines, lineno,
@@ -43,6 +50,12 @@ module Bashcov
43
50
  /\A[^\n]+\\$(\s*['"][^'"]*['"]\s*\\$){1,}\s*['"][^'"]*['"]\s*$/
44
51
  )
45
52
 
53
+ # simple line continuations with backslashes
54
+ mark_multiline(
55
+ lines, lineno,
56
+ /\A([^\n&|;]*[^\\&|;](\\\\)*\\\n)+[^\n&|;]*[^\n\\&|;](\\\\)*$/
57
+ )
58
+
46
59
  # multiline string concatenated with newlines
47
60
  %w[' "].each do |char|
48
61
  mark_multiline(
@@ -3,5 +3,5 @@
3
3
  # :nodoc:
4
4
  module Bashcov
5
5
  # Current Bashcov version
6
- VERSION = "1.8.0"
6
+ VERSION = "1.8.1"
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bashcov
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cédric Félizard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-13 00:00:00.000000000 Z
11
+ date: 2018-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  requirements: []
185
185
  rubyforge_project:
186
- rubygems_version: 2.6.14
186
+ rubygems_version: 2.7.4
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: Code coverage tool for Bash