flutter_analyze_parser 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flutter_analyze_parser.rb +5 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ef8a62122f17504429e24b5a5c661d73a41e805b
|
4
|
+
data.tar.gz: f2038fa50c7ffbd4b00d2a86b33183f84cc6191d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37200a586877e01da3a7c23416afbab9d7da09faba293c9efb10a8a0cb14b2eecef1dee8133e1059cdeb5600728823a0799a1244e8d9f486fd35cf9e71d77ef4
|
7
|
+
data.tar.gz: 94960b3e11b2d90c19e3b6eccce2a1f67cba3b16de168d3ca0331a9bd22ec33990c79974b01b3dbd9362627670f5fbe9c7eedc91dc97a0b174f05d2cf55d6e65
|
@@ -4,14 +4,16 @@ class FlutterAnalyzeParser
|
|
4
4
|
def self.violations(input)
|
5
5
|
filtered_input = filtered_input(input)
|
6
6
|
|
7
|
-
if filtered_input.
|
7
|
+
if filtered_input.detect { |element| element.include? "No issues found!" }
|
8
8
|
return []
|
9
9
|
else
|
10
10
|
violations = []
|
11
11
|
|
12
|
-
filtered_input
|
12
|
+
filtered_input
|
13
|
+
.select { |line| line.start_with? "info" }
|
14
|
+
.each do |line|
|
13
15
|
_, description, file_with_line_number, rule = line.split(" • ")
|
14
|
-
file, line
|
16
|
+
file, line = file_with_line_number.split(":")
|
15
17
|
|
16
18
|
violations << FlutterViolation.new(rule, description, file, line.to_i)
|
17
19
|
end
|
@@ -24,6 +26,5 @@ class FlutterAnalyzeParser
|
|
24
26
|
input.each_line
|
25
27
|
.reject { |line| line.strip.empty? }
|
26
28
|
.map(&:strip)
|
27
|
-
.drop(1)
|
28
29
|
end
|
29
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flutter_analyze_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mateusz Szklarek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard-rspec
|