danger-chikuwa 0.0.1 → 0.1.0

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: 7466ad1a548b5e8348d211ca9fc4e37c53ff5db463be55e5b7e9b7ec8344e7f0
4
- data.tar.gz: 800ed80939ee1392485934d460e8efc60ed755500877dbbe84aad12218762d32
3
+ metadata.gz: d31efddea934169d264144dc5e1a6f11e86cf36aaf0b9e01ea876416857186d3
4
+ data.tar.gz: 979a2be41e4409e96405aba19bd59878a6bcd1113b44a267cae85e3eb5e5fdc5
5
5
  SHA512:
6
- metadata.gz: 7835aff57135f448a0b50acdf97ecbf8e38f8d60ec0e8a298bf8745bf2968591a87b9a9fdf8be17fb728ccca7bdfbd215235dd2bde6dc58c54b8b3adefc07ea9
7
- data.tar.gz: dfb28907e00f2133ab855aa48b89737b9ad028b40408aabb81b92bc551843ac7835a46007f47096b0be7e883a428ccaaee0fb1584778e684d2ded05ecb256960
6
+ metadata.gz: f306a55ca6eaedadbe7bbe88ed7974e4552a7a2ecfa118ac123de6bf7516564862ab92bf982f24d22b04fbd2a7f7e20cad97e162b38aa06ee8ccc92387dc6b95
7
+ data.tar.gz: 637210366bb58e90fe39af511b6afb613cc277d1143d3b1d25feeb1a9f3fdff4ce3b2bfb2b18baefbb90382caa8a21a42259873e451a0bd62b55259d696a1a81
data/Gemfile.lock ADDED
@@ -0,0 +1,170 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ danger-chikuwa (0.1.0)
5
+ danger-plugin-api (~> 1.0)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ addressable (2.8.0)
11
+ public_suffix (>= 2.0.2, < 5.0)
12
+ ast (2.4.2)
13
+ claide (1.1.0)
14
+ claide-plugins (0.9.2)
15
+ cork
16
+ nap
17
+ open4 (~> 1.3)
18
+ coderay (1.1.3)
19
+ colored2 (3.1.2)
20
+ cork (0.3.0)
21
+ colored2 (~> 3.1)
22
+ danger (8.6.1)
23
+ claide (~> 1.0)
24
+ claide-plugins (>= 0.9.2)
25
+ colored2 (~> 3.1)
26
+ cork (~> 0.1)
27
+ faraday (>= 0.9.0, < 2.0)
28
+ faraday-http-cache (~> 2.0)
29
+ git (~> 1.7)
30
+ kramdown (~> 2.3)
31
+ kramdown-parser-gfm (~> 1.0)
32
+ no_proxy_fix
33
+ octokit (~> 4.7)
34
+ terminal-table (>= 1, < 4)
35
+ danger-plugin-api (1.0.0)
36
+ danger (> 2.0)
37
+ diff-lcs (1.5.0)
38
+ faraday (1.10.0)
39
+ faraday-em_http (~> 1.0)
40
+ faraday-em_synchrony (~> 1.0)
41
+ faraday-excon (~> 1.1)
42
+ faraday-httpclient (~> 1.0)
43
+ faraday-multipart (~> 1.0)
44
+ faraday-net_http (~> 1.0)
45
+ faraday-net_http_persistent (~> 1.0)
46
+ faraday-patron (~> 1.0)
47
+ faraday-rack (~> 1.0)
48
+ faraday-retry (~> 1.0)
49
+ ruby2_keywords (>= 0.0.4)
50
+ faraday-em_http (1.0.0)
51
+ faraday-em_synchrony (1.0.0)
52
+ faraday-excon (1.1.0)
53
+ faraday-http-cache (2.4.0)
54
+ faraday (>= 0.8)
55
+ faraday-httpclient (1.0.1)
56
+ faraday-multipart (1.0.4)
57
+ multipart-post (~> 2)
58
+ faraday-net_http (1.0.1)
59
+ faraday-net_http_persistent (1.2.0)
60
+ faraday-patron (1.0.0)
61
+ faraday-rack (1.0.0)
62
+ faraday-retry (1.0.3)
63
+ ffi (1.15.5)
64
+ formatador (1.1.0)
65
+ git (1.11.0)
66
+ rchardet (~> 1.8)
67
+ guard (2.18.0)
68
+ formatador (>= 0.2.4)
69
+ listen (>= 2.7, < 4.0)
70
+ lumberjack (>= 1.0.12, < 2.0)
71
+ nenv (~> 0.1)
72
+ notiffany (~> 0.0)
73
+ pry (>= 0.13.0)
74
+ shellany (~> 0.0)
75
+ thor (>= 0.18.1)
76
+ guard-compat (1.2.1)
77
+ guard-rspec (4.7.3)
78
+ guard (~> 2.1)
79
+ guard-compat (~> 1.1)
80
+ rspec (>= 2.99.0, < 4.0)
81
+ kramdown (2.4.0)
82
+ rexml
83
+ kramdown-parser-gfm (1.1.0)
84
+ kramdown (~> 2.0)
85
+ listen (3.0.7)
86
+ rb-fsevent (>= 0.9.3)
87
+ rb-inotify (>= 0.9.7)
88
+ lumberjack (1.2.8)
89
+ method_source (1.0.0)
90
+ multipart-post (2.2.3)
91
+ nap (1.1.0)
92
+ nenv (0.3.0)
93
+ no_proxy_fix (0.1.2)
94
+ notiffany (0.1.3)
95
+ nenv (~> 0.1)
96
+ shellany (~> 0.0)
97
+ octokit (4.24.0)
98
+ faraday (>= 1, < 3)
99
+ sawyer (~> 0.9)
100
+ open4 (1.3.4)
101
+ parallel (1.22.1)
102
+ parser (3.1.2.0)
103
+ ast (~> 2.4.1)
104
+ pry (0.14.1)
105
+ coderay (~> 1.1)
106
+ method_source (~> 1.0)
107
+ public_suffix (4.0.7)
108
+ rainbow (3.1.1)
109
+ rake (10.5.0)
110
+ rb-fsevent (0.11.1)
111
+ rb-inotify (0.10.1)
112
+ ffi (~> 1.0)
113
+ rchardet (1.8.0)
114
+ regexp_parser (2.5.0)
115
+ rexml (3.2.5)
116
+ rspec (3.11.0)
117
+ rspec-core (~> 3.11.0)
118
+ rspec-expectations (~> 3.11.0)
119
+ rspec-mocks (~> 3.11.0)
120
+ rspec-core (3.11.0)
121
+ rspec-support (~> 3.11.0)
122
+ rspec-expectations (3.11.0)
123
+ diff-lcs (>= 1.2.0, < 2.0)
124
+ rspec-support (~> 3.11.0)
125
+ rspec-mocks (3.11.1)
126
+ diff-lcs (>= 1.2.0, < 2.0)
127
+ rspec-support (~> 3.11.0)
128
+ rspec-support (3.11.0)
129
+ rubocop (1.30.1)
130
+ parallel (~> 1.10)
131
+ parser (>= 3.1.0.0)
132
+ rainbow (>= 2.2.2, < 4.0)
133
+ regexp_parser (>= 1.8, < 3.0)
134
+ rexml (>= 3.2.5, < 4.0)
135
+ rubocop-ast (>= 1.18.0, < 2.0)
136
+ ruby-progressbar (~> 1.7)
137
+ unicode-display_width (>= 1.4.0, < 3.0)
138
+ rubocop-ast (1.18.0)
139
+ parser (>= 3.1.1.0)
140
+ ruby-progressbar (1.11.0)
141
+ ruby2_keywords (0.0.5)
142
+ sawyer (0.9.2)
143
+ addressable (>= 2.3.5)
144
+ faraday (>= 0.17.3, < 3)
145
+ shellany (0.0.1)
146
+ terminal-table (3.0.2)
147
+ unicode-display_width (>= 1.1.1, < 3)
148
+ thor (1.2.1)
149
+ unicode-display_width (2.1.0)
150
+ webrick (1.7.0)
151
+ yard (0.9.28)
152
+ webrick (~> 1.7.0)
153
+
154
+ PLATFORMS
155
+ arm64-darwin-21
156
+
157
+ DEPENDENCIES
158
+ bundler (~> 2.0)
159
+ danger-chikuwa!
160
+ guard (~> 2.14)
161
+ guard-rspec (~> 4.7)
162
+ listen (= 3.0.7)
163
+ pry
164
+ rake (~> 10.0)
165
+ rspec (~> 3.4)
166
+ rubocop
167
+ yard
168
+
169
+ BUNDLED WITH
170
+ 2.3.0
data/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2022 watanavex <y_watanabe@yumemi.co.jp>
1
+ Copyright (c) 2022 watanavex <watanave.tech@gmail.com>
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,15 +1,38 @@
1
1
  # danger-chikuwa
2
2
 
3
- A description of danger-chikuwa.
3
+ Danger Plugin for reporting Android build errors and warnings
4
4
 
5
5
  ## Installation
6
6
 
7
- $ gem install danger-chikuwa
7
+ Add this line to your Gemfile:
8
+
9
+ ```
10
+ gem danger-chikuwa
11
+ ```
8
12
 
9
13
  ## Usage
10
14
 
11
- Methods and attributes from this plugin are available in
12
- your `Dangerfile` under the `chikuwa` namespace.
15
+ Redirect the standard and error output of the command line build to a text file.
16
+ Change the build flavor as needed.
17
+
18
+ ```
19
+ $ ./gradlew assembleDebug 2>&1 | tee build.log
20
+ ```
21
+
22
+ Add a line to your Dangerfile.
23
+
24
+ ```
25
+ chikuwa.report "build.log"
26
+ ```
27
+
28
+ Optionally supports inline comments.
29
+
30
+ ```
31
+ chikuwa.inline_mode = true
32
+ ```
33
+
34
+ Here is a sample repository.
35
+ https://github.com/watanavex/android-check-for-chikuwa/pull/5
13
36
 
14
37
  ## Development
15
38
 
@@ -18,3 +41,8 @@ A description of danger-chikuwa.
18
41
  3. Run `bundle exec rake spec` to run the tests.
19
42
  4. Use `bundle exec guard` to automatically have tests run as you make changes.
20
43
  5. Make your changes.
44
+
45
+ ## What is Chikuwa?
46
+
47
+ Chikuwa is my family❤️
48
+ ![chikuwa-photo](https://user-images.githubusercontent.com/3221619/173847362-e4cb1bd4-1b18-4ef9-abc6-fa061c215e81.png)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Chikuwa
4
- VERSION = "0.0.1"
4
+ VERSION = "0.1.0"
5
5
  end
@@ -58,11 +58,23 @@ module Danger
58
58
  next
59
59
  end
60
60
 
61
- file = Pathname(logs[1].strip).relative_path_from(_project_root).to_s
62
- line_num = /(\d+)/.match(logs[2].strip).to_a[0].to_i
63
- logs.shift(3)
64
- message = logs.join(":").strip!
65
-
61
+ path = [logs[1], logs[2]].join(":").strip
62
+ case path
63
+ when %r{^file:///.*}
64
+ # kotlin 1.8 or later
65
+ file = Pathname(logs[2].gsub(%r{^//}, "")).relative_path_from(_project_root).to_s
66
+ line_num = logs[3].to_i
67
+ logs.shift(4)
68
+ message = logs.join(":").gsub(/^(\d+)\w/, "").strip!
69
+ when %r{^/.*: \(\d+, \d+\)$}
70
+ # kotlin 1.7 or earlier
71
+ file = Pathname(logs[1].strip).relative_path_from(_project_root).to_s
72
+ line_num = /(\d+)/.match(logs[2].strip).to_a[0].to_i
73
+ logs.shift(3)
74
+ message = logs.join(":").strip!
75
+ else
76
+ next
77
+ end
66
78
  report_data.push(ReportData.new(message, type, file, line_num))
67
79
  end
68
80
 
data/spec/chikuwa_spec.rb CHANGED
@@ -25,8 +25,8 @@ module Danger
25
25
  it "Report" do
26
26
  file_path = "#{File.dirname(__FILE__)}/fixtures/build.log"
27
27
  @my_plugin.report file_path
28
- expect(@dangerfile.status_report[:warnings]).to eq(["Parameter 'context' is never used, could be renamed to _"])
29
- expect(@dangerfile.status_report[:errors]).to eq(["Unresolved reference: chikuwa"])
28
+ expect(@dangerfile.status_report[:warnings]).to eq(["Parameter 'context' is never used, could be renamed to _", "This is Kotlin 1.8 style message. Parameter 'context' is never used, could be renamed to _"])
29
+ expect(@dangerfile.status_report[:errors]).to eq(["Unresolved reference: chikuwa", "This is Kotlin 1.8 style message. Unresolved reference: chikuwa"])
30
30
  end
31
31
  end
32
32
  end
@@ -42,6 +42,8 @@
42
42
  > Task :app:compileDebugKotlin
43
43
  w: /private/tmp/chikuwa/app/src/main/java/tech/watanave/sample/chikuwa/MainActivity.kt: (23, 46): Parameter 'context' is never used, could be renamed to _
44
44
  e: /private/tmp/chikuwa/app/src/main/java/tech/watanave/sample/chikuwa/MainActivity.kt: (40, 14): Unresolved reference: chikuwa
45
+ w: file:///private/tmp/chikuwa/app/src/main/java/tech/watanave/sample/chikuwa/MainActivity.kt:23:46 This is Kotlin 1.8 style message. Parameter 'context' is never used, could be renamed to _
46
+ e: file:///private/tmp/chikuwa/app/src/main/java/tech/watanave/sample/chikuwa/MainActivity.kt:40:14 This is Kotlin 1.8 style message. Unresolved reference: chikuwa
45
47
 
46
48
  > Task :app:compileDebugJavaWithJavac
47
49
  > Task :app:dexBuilderDebug
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-chikuwa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - watanavex
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-11 00:00:00.000000000 Z
11
+ date: 2023-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api
@@ -161,6 +161,7 @@ files:
161
161
  - ".rubocop.yml"
162
162
  - ".travis.yml"
163
163
  - Gemfile
164
+ - Gemfile.lock
164
165
  - Guardfile
165
166
  - LICENSE.txt
166
167
  - README.md