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 +5 -5
- data/CHANGELOG.md +5 -1
- data/lib/bashcov/lexer.rb +14 -1
- data/lib/bashcov/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5f7a8a7c155fad81c5018015053083c015dbadfec694178e3f5ca40bc2811e93
|
4
|
+
data.tar.gz: 9adb13322f197aae9963ae90701ff24ed40f9b2473c9410f687c481592dbe387
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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(
|
data/lib/bashcov/version.rb
CHANGED
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.
|
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
|
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.
|
186
|
+
rubygems_version: 2.7.4
|
187
187
|
signing_key:
|
188
188
|
specification_version: 4
|
189
189
|
summary: Code coverage tool for Bash
|