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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ac454bcb30c2f8ad4246910d2f608ef023aa22d2
4
- data.tar.gz: '083c1f7ce293a27a88228d858e73ce7b34dcd9e3'
3
+ metadata.gz: ef8a62122f17504429e24b5a5c661d73a41e805b
4
+ data.tar.gz: f2038fa50c7ffbd4b00d2a86b33183f84cc6191d
5
5
  SHA512:
6
- metadata.gz: 3fa0efd4fee7760a54b5cb19364a8f020714fc5a8944b836014d3590ef8602343e19549540e11232ee6597b5f4a40e4c443d7dea3ca5329303ae182deac7b8e7
7
- data.tar.gz: ea9efb19cef94934f6becd7d4dbc3d35ed258fde7a893885b843de5063e92593bf244e35227f62a1054600c4d2468f67babe4fbf95627fe403e22c6540789586
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.first.include? "No issues found!"
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.each do |line|
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, = file_with_line_number.split(":")
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.0
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-10 00:00:00.000000000 Z
11
+ date: 2019-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: guard-rspec