danger-chikuwatter 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -3
- data/lib/chikuwatter/gem_version.rb +1 -1
- data/lib/chikuwatter/plugin.rb +3 -1
- data/spec/chikuwatter_spec.rb +3 -3
- data/spec/fixtures/analyze.log +7 -0
- metadata +3 -3
- data/spec/fixtures/result.log +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 37c63d1704f80d6cd8ec6cc2fbc031012fc161ecdbe65bfa9e162bbeeb81e7b7
|
4
|
+
data.tar.gz: f4c9ece4ae61dbe1d0aa4ee42ebe9444687e890506a31f57ffefd229480fee46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76ccced85fa0d95d1418673ec680c695d627f77a40196b1340b1a94253c59b307017a1e225d2e419ab11d713368b33dbf913c756357480778d1d1f0e79e228df
|
7
|
+
data.tar.gz: 226d7893282b8b8334d8dc142ad43faac2bcd6b5043fc83ea18e21056a38dea6e2f7ce1cc9e7313cda26640d31e752bced9b267eb219681e52801784ee074d46
|
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
|
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
|
-
|
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
|
-
|
30
|
+
chikuwatter.inline_mode = true
|
31
31
|
```
|
32
32
|
|
33
33
|
## Development
|
data/lib/chikuwatter/plugin.rb
CHANGED
@@ -83,7 +83,9 @@ module Danger
|
|
83
83
|
|
84
84
|
message = "#{type_str} • #{logs[3].strip!}: #{logs[1].strip!}"
|
85
85
|
|
86
|
-
report_data.push(
|
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
|
data/spec/chikuwatter_spec.rb
CHANGED
@@ -31,11 +31,11 @@ module Danger
|
|
31
31
|
end
|
32
32
|
|
33
33
|
it "Report" do
|
34
|
-
file_path = "#{File.dirname(__FILE__)}/fixtures/
|
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 •
|
38
|
-
expect(@dangerfile.status_report[:errors]).to eq(["error •
|
37
|
+
expect(@dangerfile.status_report[:warnings]).to eq(["warning • invalid_null_aware_operator: The receiver can't be null, so the null-aware operator '?.' is unnecessary", "info • deprecated_member_use: '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: The 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.
|
4
|
+
version: 0.0.2
|
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/
|
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/
|
202
|
+
- spec/fixtures/analyze.log
|
203
203
|
- spec/spec_helper.rb
|