danger-xcode_summary 1.2.0 → 1.3.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: dc604898bf47a3eb60ecd5c408807611ea65c56571990cb0e1a6987bf850902f
4
- data.tar.gz: 849961ea33f86df1aa5e664cd7b4a155830eb6c2b889c13289cc1bd64cdd3db2
3
+ metadata.gz: f7f4af287c0370b31f01a690b01e813461929e52ab57fce3285aa66bcaff49c4
4
+ data.tar.gz: ed22370ea6a8c18a4fe031ab7b8dac06654ddbc31a45862d7232520b4b98955e
5
5
  SHA512:
6
- metadata.gz: 179dd4adf7cd7dcac32e3a25d9ebd0234271eaa02d15649cab79847d2d8d2e965fa1edccf27d0e3c71e74c2e4c8c24e44c110d53b513498efc5d8a2e46ee3d5e
7
- data.tar.gz: bf254c7e2a8d7e5b8b9465052aaffa2814f077d0f965923e79816d5f81e63e678f9f2984d446be9fa49e3a7bfa539ccd70acaaee2ad84b46add1cd2d2c58e304
6
+ metadata.gz: 6fb83b4b61b89603f5b4075c67039cabcf1221defda9106583ac9b569be141fcc7cbb33475f4369eaca4c77eabd86868a9ae99cd891ee2a820764de805fcf6b9
7
+ data.tar.gz: b8ce24b92d313924532bf56626f4493cd8a1e2a9fa57beaeea66ac50cc08b40a5e5ed09c2aa8721bcce6d18a71d33820e777584e98a368517ed4d888fdea821b
@@ -0,0 +1,38 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ "master" ]
13
+ pull_request:
14
+ branches: [ "master" ]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ test:
21
+
22
+ runs-on: macos-latest
23
+ strategy:
24
+ matrix:
25
+ ruby-version: ['3.2.2']
26
+
27
+ steps:
28
+ - uses: actions/checkout@v3
29
+ - name: Set up Ruby
30
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
31
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
32
+ # uses: ruby/setup-ruby@v1
33
+ uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
34
+ with:
35
+ ruby-version: ${{ matrix.ruby-version }}
36
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
37
+ - name: Run tests
38
+ run: bundle exec rake spec
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.2.2
data/Gemfile.lock CHANGED
@@ -1,16 +1,17 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-xcode_summary (1.2.0)
4
+ danger-xcode_summary (1.3.0)
5
5
  danger-plugin-api (~> 1.0)
6
6
  xcresult (~> 0.2)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- addressable (2.8.0)
12
- public_suffix (>= 2.0.2, < 5.0)
11
+ addressable (2.8.6)
12
+ public_suffix (>= 2.0.2, < 6.0)
13
13
  ast (2.4.2)
14
+ base64 (0.2.0)
14
15
  claide (1.1.0)
15
16
  claide-plugins (0.9.2)
16
17
  cork
@@ -20,52 +21,34 @@ GEM
20
21
  colored2 (3.1.2)
21
22
  cork (0.3.0)
22
23
  colored2 (~> 3.1)
23
- danger (8.6.1)
24
+ danger (9.4.3)
24
25
  claide (~> 1.0)
25
26
  claide-plugins (>= 0.9.2)
26
27
  colored2 (~> 3.1)
27
28
  cork (~> 0.1)
28
- faraday (>= 0.9.0, < 2.0)
29
+ faraday (>= 0.9.0, < 3.0)
29
30
  faraday-http-cache (~> 2.0)
30
- git (~> 1.7)
31
+ git (~> 1.13)
31
32
  kramdown (~> 2.3)
32
33
  kramdown-parser-gfm (~> 1.0)
33
34
  no_proxy_fix
34
- octokit (~> 4.7)
35
+ octokit (>= 4.0)
35
36
  terminal-table (>= 1, < 4)
36
37
  danger-plugin-api (1.0.0)
37
38
  danger (> 2.0)
38
- diff-lcs (1.5.0)
39
- faraday (1.10.0)
40
- faraday-em_http (~> 1.0)
41
- faraday-em_synchrony (~> 1.0)
42
- faraday-excon (~> 1.1)
43
- faraday-httpclient (~> 1.0)
44
- faraday-multipart (~> 1.0)
45
- faraday-net_http (~> 1.0)
46
- faraday-net_http_persistent (~> 1.0)
47
- faraday-patron (~> 1.0)
48
- faraday-rack (~> 1.0)
49
- faraday-retry (~> 1.0)
50
- ruby2_keywords (>= 0.0.4)
51
- faraday-em_http (1.0.0)
52
- faraday-em_synchrony (1.0.0)
53
- faraday-excon (1.1.0)
54
- faraday-http-cache (2.2.0)
39
+ diff-lcs (1.5.1)
40
+ faraday (2.9.0)
41
+ faraday-net_http (>= 2.0, < 3.2)
42
+ faraday-http-cache (2.5.1)
55
43
  faraday (>= 0.8)
56
- faraday-httpclient (1.0.1)
57
- faraday-multipart (1.0.3)
58
- multipart-post (>= 1.2, < 3)
59
- faraday-net_http (1.0.1)
60
- faraday-net_http_persistent (1.2.0)
61
- faraday-patron (1.0.0)
62
- faraday-rack (1.0.0)
63
- faraday-retry (1.0.3)
64
- ffi (1.15.5)
44
+ faraday-net_http (3.1.0)
45
+ net-http
46
+ ffi (1.16.3)
65
47
  formatador (1.1.0)
66
- git (1.11.0)
48
+ git (1.19.1)
49
+ addressable (~> 2.8)
67
50
  rchardet (~> 1.8)
68
- guard (2.18.0)
51
+ guard (2.18.1)
69
52
  formatador (>= 0.2.4)
70
53
  listen (>= 2.7, < 4.0)
71
54
  lumberjack (>= 1.0.12, < 2.0)
@@ -79,79 +62,85 @@ GEM
79
62
  guard (~> 2.1)
80
63
  guard-compat (~> 1.1)
81
64
  rspec (>= 2.99.0, < 4.0)
65
+ json (2.7.1)
82
66
  kramdown (2.4.0)
83
67
  rexml
84
68
  kramdown-parser-gfm (1.1.0)
85
69
  kramdown (~> 2.0)
86
- listen (3.7.1)
70
+ language_server-protocol (3.17.0.3)
71
+ listen (3.8.0)
87
72
  rb-fsevent (~> 0.10, >= 0.10.3)
88
73
  rb-inotify (~> 0.9, >= 0.9.10)
89
- lumberjack (1.2.8)
74
+ lumberjack (1.2.10)
90
75
  method_source (1.0.0)
91
- multipart-post (2.1.1)
92
76
  nap (1.1.0)
93
77
  nenv (0.3.0)
78
+ net-http (0.4.1)
79
+ uri
94
80
  no_proxy_fix (0.1.2)
95
81
  notiffany (0.1.3)
96
82
  nenv (~> 0.1)
97
83
  shellany (~> 0.0)
98
- octokit (4.22.0)
99
- faraday (>= 0.9)
100
- sawyer (~> 0.8.0, >= 0.5.3)
84
+ octokit (8.1.0)
85
+ base64
86
+ faraday (>= 1, < 3)
87
+ sawyer (~> 0.9)
101
88
  open4 (1.3.4)
102
- parallel (1.22.1)
103
- parser (3.1.2.0)
89
+ parallel (1.24.0)
90
+ parser (3.3.0.5)
104
91
  ast (~> 2.4.1)
105
- pry (0.14.1)
92
+ racc
93
+ pry (0.14.2)
106
94
  coderay (~> 1.1)
107
95
  method_source (~> 1.0)
108
- public_suffix (4.0.7)
96
+ public_suffix (5.0.4)
97
+ racc (1.7.3)
109
98
  rainbow (3.1.1)
110
- rake (13.0.6)
111
- rb-fsevent (0.11.1)
99
+ rake (13.1.0)
100
+ rb-fsevent (0.11.2)
112
101
  rb-inotify (0.10.1)
113
102
  ffi (~> 1.0)
114
103
  rchardet (1.8.0)
115
- regexp_parser (2.3.1)
116
- rexml (3.2.5)
117
- rspec (3.11.0)
118
- rspec-core (~> 3.11.0)
119
- rspec-expectations (~> 3.11.0)
120
- rspec-mocks (~> 3.11.0)
121
- rspec-core (3.11.0)
122
- rspec-support (~> 3.11.0)
123
- rspec-expectations (3.11.0)
104
+ regexp_parser (2.9.0)
105
+ rexml (3.2.6)
106
+ rspec (3.13.0)
107
+ rspec-core (~> 3.13.0)
108
+ rspec-expectations (~> 3.13.0)
109
+ rspec-mocks (~> 3.13.0)
110
+ rspec-core (3.13.0)
111
+ rspec-support (~> 3.13.0)
112
+ rspec-expectations (3.13.0)
124
113
  diff-lcs (>= 1.2.0, < 2.0)
125
- rspec-support (~> 3.11.0)
126
- rspec-mocks (3.11.1)
114
+ rspec-support (~> 3.13.0)
115
+ rspec-mocks (3.13.0)
127
116
  diff-lcs (>= 1.2.0, < 2.0)
128
- rspec-support (~> 3.11.0)
129
- rspec-support (3.11.0)
130
- rubocop (1.28.2)
117
+ rspec-support (~> 3.13.0)
118
+ rspec-support (3.13.0)
119
+ rubocop (1.60.2)
120
+ json (~> 2.3)
121
+ language_server-protocol (>= 3.17.0)
131
122
  parallel (~> 1.10)
132
- parser (>= 3.1.0.0)
123
+ parser (>= 3.3.0.2)
133
124
  rainbow (>= 2.2.2, < 4.0)
134
125
  regexp_parser (>= 1.8, < 3.0)
135
- rexml
136
- rubocop-ast (>= 1.17.0, < 2.0)
126
+ rexml (>= 3.2.5, < 4.0)
127
+ rubocop-ast (>= 1.30.0, < 2.0)
137
128
  ruby-progressbar (~> 1.7)
138
- unicode-display_width (>= 1.4.0, < 3.0)
139
- rubocop-ast (1.17.0)
140
- parser (>= 3.1.1.0)
141
- ruby-progressbar (1.11.0)
142
- ruby2_keywords (0.0.5)
143
- sawyer (0.8.2)
129
+ unicode-display_width (>= 2.4.0, < 3.0)
130
+ rubocop-ast (1.30.0)
131
+ parser (>= 3.2.1.0)
132
+ ruby-progressbar (1.13.0)
133
+ sawyer (0.9.2)
144
134
  addressable (>= 2.3.5)
145
- faraday (> 0.8, < 2.0)
135
+ faraday (>= 0.17.3, < 3)
146
136
  shellany (0.0.1)
147
137
  terminal-table (3.0.2)
148
138
  unicode-display_width (>= 1.1.1, < 3)
149
- thor (1.2.1)
150
- unicode-display_width (2.1.0)
151
- webrick (1.7.0)
139
+ thor (1.3.0)
140
+ unicode-display_width (2.5.0)
141
+ uri (0.13.0)
152
142
  xcresult (0.2.1)
153
- yard (0.9.27)
154
- webrick (~> 1.7.0)
143
+ yard (0.9.34)
155
144
 
156
145
  PLATFORMS
157
146
  ruby
data/README.md CHANGED
@@ -56,6 +56,24 @@ A [Danger](http://danger.systems) plugin that shows all build errors, warnings a
56
56
  </tbody>
57
57
  </table>
58
58
 
59
+ <table>
60
+ <thead>
61
+ <tr>
62
+ <th width="50"></th>
63
+ <th width="100%">
64
+ 1 Message
65
+ </th>
66
+ </tr>
67
+ </thead>
68
+ <tbody>
69
+ <tr>
70
+ <td><g-emoji alias="book" fallback-src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f4d6.png">📖</g-emoji></td>
71
+ <td>TestTarget: Executed 5 tests, with 1 failure (0 unexpected) in 0.032 (0.065) seconds</td>
72
+ </tr>
73
+ </tr>
74
+ </tbody>
75
+ </table>
76
+
59
77
  ## Installation
60
78
 
61
79
  Add this line to your Gemfile:
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XcodeSummary
4
- VERSION = '1.2.0'
4
+ VERSION = '1.3.0'
5
5
  end
@@ -21,6 +21,7 @@ module Danger
21
21
  class DangerXcodeSummary < Plugin
22
22
  Location = Struct.new(:file_name, :file_path, :line)
23
23
  Result = Struct.new(:message, :location)
24
+ Warning = Struct.new(:message, :sticky, :location)
24
25
 
25
26
  # The project root, which will be used to make the paths relative.
26
27
  # Defaults to `pwd`.
@@ -39,10 +40,30 @@ module Danger
39
40
  # A block that filters specific results.
40
41
  # An example would be `lambda { |result| result.message.start_with?('ld') }` to ignore results for ld_warnings.
41
42
  #
42
- # @param [Block value
43
+ # @param [Block] value
43
44
  # @return [Block]
44
45
  attr_accessor :ignored_results
45
46
 
47
+ # Defines if the test summary will be sticky or not.
48
+ # Defaults to `false`.
49
+ # @param [Boolean] value
50
+ # @return [Boolean]
51
+ attr_accessor :sticky_summary
52
+
53
+ # Defines if the build summary is shown or not.
54
+ # Defaults to `true`.
55
+ # @param [Boolean] value
56
+ # @return [Boolean]
57
+ attr_accessor :test_summary
58
+
59
+ # A block that sorts the warning results.
60
+ # An example would be `lambda { |warning| warning.message.include?("deprecated") ? 1 : 0 }` to sort results for
61
+ # deprecated warnings.
62
+ #
63
+ # @param [Block] value
64
+ # @return [Block]
65
+ attr_accessor :sort_warnings_by
66
+
46
67
  # Defines if using inline comment or not.
47
68
  # Defaults to `false`.
48
69
  # @param [Boolean] value
@@ -72,10 +93,22 @@ module Danger
72
93
  [@ignored_files].flatten.compact
73
94
  end
74
95
 
96
+ def sort_warnings_by(&block)
97
+ @sort_warnings_by ||= block
98
+ end
99
+
75
100
  def ignored_results(&block)
76
101
  @ignored_results ||= block
77
102
  end
78
103
 
104
+ def sticky_summary
105
+ @sticky_summary || false
106
+ end
107
+
108
+ def test_summary
109
+ @test_summary.nil? ? true : @test_summary
110
+ end
111
+
79
112
  def inline_mode
80
113
  @inline_mode || false
81
114
  end
@@ -134,13 +167,17 @@ module Danger
134
167
  private
135
168
 
136
169
  def format_summary(xcode_summary)
170
+ messages(xcode_summary).each { |s| message(s, sticky: sticky_summary) }
171
+ all_warnings = []
137
172
  xcode_summary.actions_invocation_record.actions.each do |action|
138
173
  warnings(action).each do |result|
174
+ warning_object = nil
139
175
  if inline_mode && result.location
140
- warn(result.message, sticky: false, file: result.location.file_path, line: result.location.line)
176
+ warning_object = Warning.new(result.message, false, result.location)
141
177
  else
142
- warn(result.message, sticky: false)
178
+ warning_object = Warning.new(result.message, false, nil)
143
179
  end
180
+ all_warnings << warning_object
144
181
  end
145
182
  errors(action).each do |result|
146
183
  if inline_mode && result.location
@@ -158,6 +195,45 @@ module Danger
158
195
  end
159
196
  end
160
197
  end
198
+ sort_and_log_warnings(all_warnings)
199
+ end
200
+
201
+ def sort_and_log_warnings(all_warnings)
202
+ all_warnings = all_warnings.sort_by(&sort_warnings_by)
203
+ all_warnings.each do |warning|
204
+ if inline_mode && warning.location
205
+ warn(warning.message, sticky: warning.sticky, file: warning.location.file_path, line: warning.location.line)
206
+ else
207
+ warn(warning.message, sticky: warning.sticky)
208
+ end
209
+ end
210
+ end
211
+
212
+ def messages(xcode_summary)
213
+ if test_summary
214
+ test_messages = xcode_summary.action_test_plan_summaries.map do |test_plan_summaries|
215
+ test_plan_summaries.summaries.map do |summary|
216
+ summary.testable_summaries.map do |test_summary|
217
+ test_summary.tests.filter_map do |action_test_object|
218
+ if action_test_object.instance_of? XCResult::ActionTestSummaryGroup
219
+ subtests = action_test_object.all_subtests
220
+ subtests_duration = subtests.map(&:duration).sum
221
+ test_text_infix = subtests.count == 1 ? 'test' : 'tests'
222
+ failed_tests_count = subtests.reject { |test| test.test_status == 'Success' }.count
223
+ expected_failed_tests_count = subtests.select { |test| test.test_status == 'Expected Failure' }.count
224
+
225
+ "#{test_summary.target_name}: Executed #{subtests.count} #{test_text_infix}, " \
226
+ "with #{failed_tests_count} failures (#{expected_failed_tests_count} expected) in " \
227
+ "#{subtests_duration.round(3)} (#{action_test_object.duration.round(3)}) seconds"
228
+ end
229
+ end
230
+ end
231
+ end
232
+ end
233
+ test_messages.flatten.uniq.compact.map(&:strip)
234
+ else
235
+ []
236
+ end
161
237
  end
162
238
 
163
239
  def warnings(action)
@@ -197,7 +273,7 @@ module Danger
197
273
  end
198
274
 
199
275
  def parse_location(document_location)
200
- return nil if document_location.nil?
276
+ return nil if document_location&.url.nil?
201
277
 
202
278
  file_path = document_location.url.gsub('file://', '').split('#').first
203
279
  file_name = file_path.split('/').last
@@ -245,6 +321,8 @@ module Danger
245
321
  end
246
322
 
247
323
  def format_test_failure(result, producing_target, test_case_name)
324
+ return escape_reason(result.message) if result.location.nil?
325
+
248
326
  path = result.location.file_path
249
327
  path_link = format_path(path, result.location.line)
250
328
  suite_name = "#{producing_target}.#{test_case_name}"
@@ -23,6 +23,26 @@ module Danger
23
23
  expect(@dangerfile.status_report[:errors]).to eq ['summary file not found']
24
24
  end
25
25
 
26
+ describe 'summary' do
27
+ context 'enabled' do
28
+ it 'formats summary messages' do
29
+ @xcode_summary.test_summary = true
30
+ @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
31
+ expect(@dangerfile.status_report[:messages]).to eq [
32
+ 'SwiftLintFrameworkTests: Executed 540 tests, with 1 failures (0 expected) in 114.029 (27.922) seconds'
33
+ ]
34
+ end
35
+ end
36
+
37
+ context 'disabled' do
38
+ it 'shows no summary messages' do
39
+ @xcode_summary.test_summary = false
40
+ @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
41
+ expect(@dangerfile.status_report[:messages]).to eq []
42
+ end
43
+ end
44
+ end
45
+
26
46
  context 'reporting' do
27
47
  it 'formats compile warnings' do
28
48
  @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
@@ -189,6 +209,54 @@ module Danger
189
209
  expect(result).to eq '{"warnings":21,"errors":3}'
190
210
  end
191
211
  end
212
+
213
+ context 'with sort_warnings_by' do
214
+ before do
215
+ @xcode_summary.sort_warnings_by do |warning|
216
+ warning.message.include?('TODOs') ? 0 : 1
217
+ end
218
+ end
219
+ it 'sorts compile warnings' do
220
+ @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
221
+ expect(@dangerfile.status_report[:warnings]).to eq [
222
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Constructor.swift#L492'>Carthage/Checkouts/Yams/Sources/Yams/Constructor.swift#L492</a>**: Todo Violation: TODOs should be resolved (Should raise error if subnode ...). (todo)",
223
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Tests/YamsTests/SpecTests.swift#L379'>Carthage/Checkouts/Yams/Tests/YamsTests/SpecTests.swift#L379</a>**: Todo Violation: TODOs should be resolved (YAML supports keys other than ...). (todo)",
224
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Tests/YamsTests/SpecTests.swift#L714'>Carthage/Checkouts/Yams/Tests/YamsTests/SpecTests.swift#L714</a>**: Todo Violation: TODOs should be resolved (local tag parsing). (todo)",
225
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Representer.swift#L187'>Carthage/Checkouts/Yams/Sources/Yams/Representer.swift#L187</a>**: Todo Violation: TODOs should be resolved (Support `Float80`). (todo)",
226
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Constructor.swift#L405'>Carthage/Checkouts/Yams/Sources/Yams/Constructor.swift#L405</a>**: Todo Violation: TODOs should be resolved (YAML supports keys other than ...). (todo)",
227
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Constructor.swift#L430'>Carthage/Checkouts/Yams/Sources/Yams/Constructor.swift#L430</a>**: Todo Violation: TODOs should be resolved (Should raise error on other th...). (todo)",
228
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Constructor.swift#L450'>Carthage/Checkouts/Yams/Sources/Yams/Constructor.swift#L450</a>**: Todo Violation: TODOs should be resolved (YAML supports Hashable element...). (todo)",
229
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Constructor.swift#L478'>Carthage/Checkouts/Yams/Sources/Yams/Constructor.swift#L478</a>**: Todo Violation: TODOs should be resolved (Should raise error if subnode ...). (todo)",
230
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Emitter.swift#L340'>Carthage/Checkouts/Yams/Sources/Yams/Emitter.swift#L340</a>**: Todo Violation: TODOs should be resolved (Support tags). (todo)",
231
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/SWXMLHash/Source/XMLIndexer+XMLIndexerDeserializable.swift#L538'>Carthage/Checkouts/SWXMLHash/Source/XMLIndexer+XMLIndexerDeserializable.swift#L538</a>**: 'public' modifier is redundant for instance method declared in a public extension",
232
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/SWXMLHash/Source/XMLIndexer+XMLIndexerDeserializable.swift#L552'>Carthage/Checkouts/SWXMLHash/Source/XMLIndexer+XMLIndexerDeserializable.swift#L552</a>**: 'public' modifier is redundant for instance method declared in a public extension",
233
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Tag.swift#L88'>Carthage/Checkouts/Yams/Sources/Yams/Tag.swift#L88</a>**: Legacy Hashing Violation: Prefer using the `hash(into:)` function instead of overriding `hashValue` (legacy_hashing)",
234
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Result/Result/NoError.swift#L8'>Carthage/Checkouts/Result/Result/NoError.swift#L8</a>**: Will never be executed",
235
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Tag.swift#L109'>Carthage/Checkouts/Yams/Sources/Yams/Tag.swift#L109</a>**: Legacy Hashing Violation: Prefer using the `hash(into:)` function instead of overriding `hashValue` (legacy_hashing)",
236
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Decoder.swift#L102'>Carthage/Checkouts/Yams/Sources/Yams/Decoder.swift#L102</a>**: Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)",
237
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Node.swift#L191'>Carthage/Checkouts/Yams/Sources/Yams/Node.swift#L191</a>**: Legacy Hashing Violation: Prefer using the `hash(into:)` function instead of overriding `hashValue` (legacy_hashing)",
238
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Encoder.swift#L139'>Carthage/Checkouts/Yams/Sources/Yams/Encoder.swift#L139</a>**: Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)",
239
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Sources/Yams/Parser.swift#L441'>Carthage/Checkouts/Yams/Sources/Yams/Parser.swift#L441</a>**: File Line Length Violation: File should contain 400 lines or less: currently contains 441 (file_length)",
240
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Tests/YamsTests/EncoderTests.swift#L924'>Carthage/Checkouts/Yams/Tests/YamsTests/EncoderTests.swift#L924</a>**: Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)",
241
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Tests/YamsTests/EncoderTests.swift#L937'>Carthage/Checkouts/Yams/Tests/YamsTests/EncoderTests.swift#L937</a>**: Colon Violation: Colons should be next to the identifier when specifying a type and next to the key in dictionary literals. (colon)",
242
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Carthage/Checkouts/Yams/Tests/YamsTests/EncoderTests.swift#L253'>Carthage/Checkouts/Yams/Tests/YamsTests/EncoderTests.swift#L253</a>**: Superfluous Disable Command Violation: 'unused_private_declaration' is not a valid SwiftLint rule. Please remove it from the disable command. (superfluous_disable_command)"
243
+ ]
244
+ end
245
+
246
+ it 'formats errors' do
247
+ @xcode_summary.report('spec/fixtures/build_error.xcresult')
248
+ expect(@dangerfile.status_report[:errors]).to eq [
249
+ 'Testing cancelled because the build failed.',
250
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Source/SwiftLintFramework/Extensions/QueuedPrint.swift#L13'>Source/SwiftLintFramework/Extensions/QueuedPrint.swift#L13</a>**: Use of unresolved identifier 'queue'",
251
+ "**<a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Source/SwiftLintFramework/Extensions/QueuedPrint.swift#L17'>Source/SwiftLintFramework/Extensions/QueuedPrint.swift#L17</a>**: Use of unresolved identifier 'queue'"
252
+ ]
253
+ end
254
+
255
+ it 'report warning and error counts' do
256
+ result = @xcode_summary.warning_error_count('spec/fixtures/build_error.xcresult')
257
+ expect(result).to eq '{"warnings":21,"errors":3}'
258
+ end
259
+ end
192
260
  end
193
261
  end
194
262
 
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-xcode_summary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diogo Tridapalli
8
8
  - Marcelo Fabri
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-04-30 00:00:00.000000000 Z
12
+ date: 2024-02-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: xcresult
@@ -146,9 +146,10 @@ extensions: []
146
146
  extra_rdoc_files: []
147
147
  files:
148
148
  - ".gitattributes"
149
+ - ".github/workflows/ruby.yml"
149
150
  - ".gitignore"
150
151
  - ".rubocop.yml"
151
- - ".travis.yml"
152
+ - ".ruby-version"
152
153
  - Gemfile
153
154
  - Gemfile.lock
154
155
  - Guardfile
@@ -296,7 +297,7 @@ homepage: https://github.com/diogot/danger-xcode_summary
296
297
  licenses:
297
298
  - MIT
298
299
  metadata: {}
299
- post_install_message:
300
+ post_install_message:
300
301
  rdoc_options: []
301
302
  require_paths:
302
303
  - lib
@@ -311,8 +312,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
311
312
  - !ruby/object:Gem::Version
312
313
  version: '0'
313
314
  requirements: []
314
- rubygems_version: 3.1.4
315
- signing_key:
315
+ rubygems_version: 3.4.10
316
+ signing_key:
316
317
  specification_version: 4
317
318
  summary: A [Danger](http://danger.systems) plugin that shows all build errors, warnings
318
319
  and unit tests results generated from `xcodebuild`.
data/.travis.yml DELETED
@@ -1,19 +0,0 @@
1
- language: ruby
2
- cache:
3
- directories:
4
- - bundle
5
-
6
- os: osx
7
- osx_image: xcode11
8
-
9
- rvm:
10
- - 2.6.0
11
- - 2.5.3
12
-
13
- # install bundler 2.x
14
- before_install:
15
- - gem update --system
16
- - gem install bundler
17
-
18
- script:
19
- - bundle exec rake spec