danger-chikuwatter 0.0.1 → 0.0.3

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: 907f5157662a6a69023d661f64e7461a279466ae66adfc9e51d3692ccf061502
4
- data.tar.gz: 8d4f3e8f7161fba38842d320fb309519024af2f854b962e898597cbaf4b9c5bb
3
+ metadata.gz: e7a602ef5810a9cfe876817c4c1b746266d715fd1af8a0928952488c91171426
4
+ data.tar.gz: 3aadfb9008e6a0703436a87dccf63737bfc4a45b99e737a7c66a32a6bb61fc23
5
5
  SHA512:
6
- metadata.gz: 771c21e1fbb14c3f49029412068543a43c50b25ff2f54ff329ef492bda564e3980c1790e473a63ba04611aec895d7ca845ebd99766cc165dc2a4dc2850b02f58
7
- data.tar.gz: 206194f8d5f75d279c40c53c5faaf06cdc8d5f9c481c46164aedfcb10bb73b0f2a03f478997d33659fedabbdf36515390effceaf30a2a43ab1e61aa7aea40189
6
+ metadata.gz: 6a752695bba8e31fb3f379550cd2a85da512916155e66b469eb7177ac800c62e3fd6c55000d81d9bf25312142174e3638928d73ae4e6d358e31bddaf140af0e5
7
+ data.tar.gz: c640f16976cdee35887a14680c8ce1c33ccb464b327accd0ba4e0e3f1f3f48ad190453a4e14b88fc266a6716ec2f04db935020ef9d0463187f6fcbaa2e5570fc
data/README.md CHANGED
@@ -15,19 +15,19 @@ gem danger-chikuwa
15
15
  Run flutter analyze and save the result to a file.
16
16
 
17
17
  ```
18
- $ flutter analyze > result.log
18
+ $ flutter analyze 2>&1 | tee result.log
19
19
  ```
20
20
 
21
21
  Add the following to your Dangerfile.
22
22
 
23
23
  ```
24
- chikuwa.report "result.log"
24
+ chikuwatter.report "analyze.log"
25
25
  ```
26
26
 
27
27
  If `inline_mode` is true, the plugin will report the errors, warnings and **info** as inline comments.
28
28
 
29
29
  ```
30
- chikuwa.inline_mode = true
30
+ chikuwatter.inline_mode = true
31
31
  ```
32
32
 
33
33
  ## Development
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Chikuwatter
4
- VERSION = "0.0.1"
4
+ VERSION = "0.0.3"
5
5
  end
@@ -81,9 +81,11 @@ module Danger
81
81
  type = Type.from_string(type_str)
82
82
  file, line_num = logs[2].strip!.split(":")
83
83
 
84
- message = "#{type_str} • #{logs[3].strip!}: #{logs[1].strip!}"
84
+ message = "#{type_str} • `#{logs[3].strip!}`\n#{logs[1].strip!}"
85
85
 
86
- report_data.push(ReportData.new(message, type, file, line_num))
86
+ report_data.push(
87
+ ReportData.new(message, type, file, line_num.to_i)
88
+ )
87
89
  end
88
90
 
89
91
  return report_data
@@ -31,11 +31,11 @@ module Danger
31
31
  end
32
32
 
33
33
  it "Report" do
34
- file_path = "#{File.dirname(__FILE__)}/fixtures/result.log"
34
+ file_path = "#{File.dirname(__FILE__)}/fixtures/analyze.log"
35
35
  @my_plugin.inline_mode = true
36
36
  @my_plugin.report file_path
37
- expect(@dangerfile.status_report[:warnings]).to eq(["warning • lint_rule: warning message", "info • lint_rule: info message"])
38
- expect(@dangerfile.status_report[:errors]).to eq(["error • lint_rule: error message"])
37
+ expect(@dangerfile.status_report[:warnings]).to eq(["warning • `invalid_null_aware_operator`\nThe receiver can't be null, so the null-aware operator '?.' is unnecessary", "info • `deprecated_member_use`\n'headline1' is deprecated and shouldn't be used. Use displayLarge instead. This feature was deprecated after v3.1.0-0.0.pre"])
38
+ expect(@dangerfile.status_report[:errors]).to eq(["error • `argument_type_not_assignable`\nThe argument type 'String?' can't be assigned to the parameter type 'String'"])
39
39
  end
40
40
  end
41
41
  end
@@ -0,0 +1,7 @@
1
+ Analyzing test...
2
+
3
+ error • The argument type 'String?' can't be assigned to the parameter type 'String' • lib/main.dart:76:21 • argument_type_not_assignable
4
+ warning • The receiver can't be null, so the null-aware operator '?.' is unnecessary • lib/main.dart:76:27 • invalid_null_aware_operator
5
+ info • 'headline1' is deprecated and shouldn't be used. Use displayLarge instead. This feature was deprecated after v3.1.0-0.0.pre • lib/main.dart:103:50 • deprecated_member_use
6
+
7
+ 3 issues found. (ran in 0.7s)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-chikuwatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - watanavex
@@ -172,7 +172,7 @@ files:
172
172
  - lib/danger_chikuwatter.rb
173
173
  - lib/danger_plugin.rb
174
174
  - spec/chikuwatter_spec.rb
175
- - spec/fixtures/result.log
175
+ - spec/fixtures/analyze.log
176
176
  - spec/spec_helper.rb
177
177
  homepage: https://github.com/watanavex/danger-chikuwatter
178
178
  licenses:
@@ -199,5 +199,5 @@ specification_version: 4
199
199
  summary: A longer description of danger-chikuwatter.
200
200
  test_files:
201
201
  - spec/chikuwatter_spec.rb
202
- - spec/fixtures/result.log
202
+ - spec/fixtures/analyze.log
203
203
  - spec/spec_helper.rb
@@ -1,5 +0,0 @@
1
- Analyzing master...
2
-
3
- warning • warning message • lib/main.dart:10:10 • lint_rule
4
- error • error message • lib/main.dart:10:10 • lint_rule
5
- info • info message • lib/main.dart:10:10 • lint_rule