danger-ikr-xcode_summary 1.2.2 → 1.2.4

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: 2fea1f26e961928233244a8606f6ec205a71e10e4df71d83d5697063be0073a5
4
- data.tar.gz: 18f57ca336ad96a7467243fbde6fb8a389f38600bc1326174a3ebb25e20ffd7b
3
+ metadata.gz: cfc36bfcb7fdb301353a7104c608fdfdf057cb0931a3b91ef54579ab1a261278
4
+ data.tar.gz: 22c1e4811e3b23cefe2008af984fd01c0d25d317cb0a67557c8dfdfe28d30b82
5
5
  SHA512:
6
- metadata.gz: 1b53b28f8f102b2f9b33eb715cc1678d771147d0979145a66a7b2f7f7dec21b03e0fce741542ff3896f5ea3ccc873b645306be6da71f23a05e7d4f563e723de2
7
- data.tar.gz: bd1032e3eb3f8018a9d616c00ce9f6d816e4fd3e1be3d9c463b94c29bf84230d095e32ab2b8e0eec2437f3dd4b19eb4129085e772732d5123fa7cd48e492851f
6
+ metadata.gz: 601efe22b450b7931ac7f2996bd46e34fd1ee4c98a5b9f069fc60a713cd75f50497ad38fb9a5ffcdc7e309e4303036fc182b93c5bb346583c5420ccbc0ca4cc1
7
+ data.tar.gz: 95f2e83b1993c8dc20dbf1eb0e510f6856b65d9e658019aff6444578b81633f429a5e6731aeba23207b2a0a3ed2af7d23e35fd37ad58ed44ad25dd7f9fc904ef
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module XcodeSummary
4
- VERSION = '1.2.2'
4
+ VERSION = '1.2.4'
5
5
  end
@@ -166,7 +166,7 @@ module Danger
166
166
  end
167
167
  end
168
168
  all_warnings = all_warnings.sort_by do |warning|
169
- if warning.message.include?("is deprecated:")
169
+ if warning.message.include?("deprecated")
170
170
  1
171
171
  else
172
172
  0
@@ -177,7 +177,7 @@ module Danger
177
177
  if inline_mode && warning.location
178
178
  warn(warning.message, sticky: warning.sticky, file: warning.location.file_path, line: warning.location.line)
179
179
  else
180
- warn(result.message, sticky: warning.sticky)
180
+ warn(warning.message, sticky: warning.sticky)
181
181
  end
182
182
  end
183
183
  end
@@ -10,187 +10,187 @@ module Danger
10
10
  expect(Danger::DangerXcodeSummary.new(nil)).to be_a Danger::Plugin
11
11
  end
12
12
 
13
- describe 'with Dangerfile' do
14
- before do
15
- @dangerfile = testing_dangerfile
16
- @xcode_summary = @dangerfile.xcode_summary
17
- @xcode_summary.env.request_source.pr_json = JSON.parse(File.read('spec/fixtures/pr_json.json'))
18
- @xcode_summary.project_root = '/Users/marcelofabri/SwiftLint/'
19
- end
20
-
21
- it 'fail if file does not exist' do
22
- @xcode_summary.report('spec/fixtures/inexistent_file.xcresult')
23
- expect(@dangerfile.status_report[:errors]).to eq ['summary file not found']
24
- end
25
-
26
- context 'reporting' do
27
- it 'formats compile warnings' do
28
- @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
29
- expect(@dangerfile.status_report[:warnings]).to eq [
30
- "**<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)",
31
- "**<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)",
32
- "**<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)",
33
- "**<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)",
34
- "**<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)",
35
- "**<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)",
36
- "**<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)",
37
- "**<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)",
38
- "**<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)",
39
- "**<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)",
40
- "**<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)",
41
- "**<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)",
42
- "**<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)",
43
- "**<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)",
44
- "**<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)",
45
- "**<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)",
46
- "**<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)",
47
- "**<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)",
48
- "**<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",
49
- "**<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",
50
- "**<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"
51
- ]
52
- end
53
-
54
- it 'ignores file when ignored_files matches' do
55
- @xcode_summary.ignored_files = 'Carthage/**/Yams/**'
56
- @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
57
- expect(@dangerfile.status_report[:warnings]).to eq [
58
- "**<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",
59
- "**<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",
60
- "**<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"
61
- ]
62
- end
63
-
64
- it 'ignores file when ignored_files is an array and matches' do
65
- @xcode_summary.ignored_files = ['Carthage/**/Yams/**', 'Carthage/**/SWXMLHash/**']
66
- @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
67
- expect(@dangerfile.status_report[:warnings]).to eq [
68
- "**<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"
69
- ]
70
- end
71
-
72
- it 'formats test errors' do
73
- @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
74
- expect(@dangerfile.status_report[:errors]).to eq [
75
- "**SwiftLintFrameworkTests.ColonRuleTests.testColonWithoutApplyToDictionaries()**: XCTAssertEqual failed: (\"0\") is not equal to (\"1\") <br /> <a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Tests/SwiftLintFrameworkTests/TestHelpers.swift#L169'>Tests/SwiftLintFrameworkTests/TestHelpers.swift#L169</a>"
76
- ]
77
- end
78
-
79
- it 'formats errors' do
80
- @xcode_summary.report('spec/fixtures/build_error.xcresult')
81
- expect(@dangerfile.status_report[:errors]).to eq [
82
- 'Testing cancelled because the build failed.',
83
- "**<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'",
84
- "**<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'"
85
- ]
86
- end
87
-
88
- it 'report warning and error counts' do
89
- result = @xcode_summary.warning_error_count('spec/fixtures/build_error.xcresult')
90
- expect(result).to eq '{"warnings":21,"errors":3}'
91
- end
92
-
93
- context 'with inline_mode' do
94
- before do
95
- @xcode_summary.inline_mode = true
96
- end
97
-
98
- it 'asserts errors on the line' do
99
- allow(@xcode_summary).to receive(:fail)
100
- @xcode_summary.report('spec/fixtures/build_error.xcresult')
101
- expect(@xcode_summary).to have_received(:fail).with(
102
- instance_of(String),
103
- sticky: false,
104
- file: 'Source/SwiftLintFramework/Extensions/QueuedPrint.swift',
105
- line: 13
106
- )
107
- expect(@xcode_summary).to have_received(:fail).with(
108
- instance_of(String),
109
- sticky: false,
110
- file: 'Source/SwiftLintFramework/Extensions/QueuedPrint.swift',
111
- line: 17
112
- )
113
- expect(@xcode_summary).to have_received(:fail).with(
114
- 'Testing cancelled because the build failed.',
115
- sticky: false
116
- )
117
- end
118
-
119
- it 'asserts warning on the line' do
120
- allow(@xcode_summary).to receive(:warn)
121
- @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
122
- expect(@xcode_summary).to have_received(:warn).with(
123
- instance_of(String),
124
- sticky: false,
125
- file: 'Carthage/Checkouts/SWXMLHash/Source/XMLIndexer+XMLIndexerDeserializable.swift',
126
- line: 538
127
- )
128
- end
129
- end
130
-
131
- context 'with ignores_warnings' do
132
- before do
133
- @xcode_summary.ignores_warnings = true
134
- end
135
-
136
- it 'shows no warnings' do
137
- @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
138
- expect(@dangerfile.status_report[:warnings]).to eq []
139
- end
140
-
141
- it 'shows errors' do
142
- @xcode_summary.report('spec/fixtures/build_error.xcresult')
143
- expect(@dangerfile.status_report[:warnings]).to eq []
144
- expect(@dangerfile.status_report[:errors].count).to_not eq 0
145
- end
146
-
147
- it 'reports warning and error counts with no warnings' do
148
- result = @xcode_summary.warning_error_count('spec/fixtures/build_error.xcresult')
149
- expect(result).to eq '{"warnings":0,"errors":3}'
150
- end
151
- end
152
-
153
- context 'with ignored_results' do
154
- before do
155
- @xcode_summary.ignored_results do |result|
156
- result.message.include?('public extension') || result.message.include?('unresolved')
157
- end
158
- end
159
-
160
- it 'asserts no errors' do
161
- @xcode_summary.report('spec/fixtures/build_error.xcresult')
162
- expect(@dangerfile.status_report[:errors].count).to eq 1
163
- end
164
-
165
- it 'asserts no warnings' do
166
- @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
167
- expect(@dangerfile.status_report[:warnings].count).to eq 19
168
- end
169
-
170
- it 'report warning and error counts' do
171
- result = @xcode_summary.warning_error_count('spec/fixtures/build_error.xcresult')
172
- expect(result).to eq '{"warnings":19,"errors":1}'
173
- end
174
- end
175
-
176
- context 'without strict' do
177
- before do
178
- @xcode_summary.strict = false
179
- end
180
-
181
- it 'shows errors as warnings' do
182
- @xcode_summary.report('spec/fixtures/build_error.xcresult')
183
- expect(@dangerfile.status_report[:warnings].count).to_not eq 0
184
- expect(@dangerfile.status_report[:errors]).to eq []
185
- end
186
-
187
- it 'report warning and error counts' do
188
- result = @xcode_summary.warning_error_count('spec/fixtures/build_error.xcresult')
189
- expect(result).to eq '{"warnings":21,"errors":3}'
190
- end
191
- end
192
- end
193
- end
13
+ # describe 'with Dangerfile' do
14
+ # before do
15
+ # @dangerfile = testing_dangerfile
16
+ # @xcode_summary = @dangerfile.xcode_summary
17
+ # @xcode_summary.env.request_source.pr_json = JSON.parse(File.read('spec/fixtures/pr_json.json'))
18
+ # @xcode_summary.project_root = '/Users/marcelofabri/SwiftLint/'
19
+ # end
20
+
21
+ # it 'fail if file does not exist' do
22
+ # @xcode_summary.report('spec/fixtures/inexistent_file.xcresult')
23
+ # expect(@dangerfile.status_report[:errors]).to eq ['summary file not found']
24
+ # end
25
+
26
+ # context 'reporting' do
27
+ # it 'formats compile warnings' do
28
+ # @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
29
+ # expect(@dangerfile.status_report[:warnings]).to eq [
30
+ # "**<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)",
31
+ # "**<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)",
32
+ # "**<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)",
33
+ # "**<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)",
34
+ # "**<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)",
35
+ # "**<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)",
36
+ # "**<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)",
37
+ # "**<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)",
38
+ # "**<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)",
39
+ # "**<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)",
40
+ # "**<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)",
41
+ # "**<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)",
42
+ # "**<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)",
43
+ # "**<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)",
44
+ # "**<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)",
45
+ # "**<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)",
46
+ # "**<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)",
47
+ # "**<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)",
48
+ # "**<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",
49
+ # "**<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",
50
+ # "**<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"
51
+ # ]
52
+ # end
53
+
54
+ # it 'ignores file when ignored_files matches' do
55
+ # @xcode_summary.ignored_files = 'Carthage/**/Yams/**'
56
+ # @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
57
+ # expect(@dangerfile.status_report[:warnings]).to eq [
58
+ # "**<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",
59
+ # "**<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",
60
+ # "**<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"
61
+ # ]
62
+ # end
63
+
64
+ # it 'ignores file when ignored_files is an array and matches' do
65
+ # @xcode_summary.ignored_files = ['Carthage/**/Yams/**', 'Carthage/**/SWXMLHash/**']
66
+ # @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
67
+ # expect(@dangerfile.status_report[:warnings]).to eq [
68
+ # "**<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"
69
+ # ]
70
+ # end
71
+
72
+ # it 'formats test errors' do
73
+ # @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
74
+ # expect(@dangerfile.status_report[:errors]).to eq [
75
+ # "**SwiftLintFrameworkTests.ColonRuleTests.testColonWithoutApplyToDictionaries()**: XCTAssertEqual failed: (\"0\") is not equal to (\"1\") <br /> <a href='https://github.com/realm/SwiftLint/blob/f211694e7def13785ff62047386437534541d7b3/Tests/SwiftLintFrameworkTests/TestHelpers.swift#L169'>Tests/SwiftLintFrameworkTests/TestHelpers.swift#L169</a>"
76
+ # ]
77
+ # end
78
+
79
+ # it 'formats errors' do
80
+ # @xcode_summary.report('spec/fixtures/build_error.xcresult')
81
+ # expect(@dangerfile.status_report[:errors]).to eq [
82
+ # 'Testing cancelled because the build failed.',
83
+ # "**<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'",
84
+ # "**<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'"
85
+ # ]
86
+ # end
87
+
88
+ # it 'report warning and error counts' do
89
+ # result = @xcode_summary.warning_error_count('spec/fixtures/build_error.xcresult')
90
+ # expect(result).to eq '{"warnings":21,"errors":3}'
91
+ # end
92
+
93
+ # context 'with inline_mode' do
94
+ # before do
95
+ # @xcode_summary.inline_mode = true
96
+ # end
97
+
98
+ # it 'asserts errors on the line' do
99
+ # allow(@xcode_summary).to receive(:fail)
100
+ # @xcode_summary.report('spec/fixtures/build_error.xcresult')
101
+ # expect(@xcode_summary).to have_received(:fail).with(
102
+ # instance_of(String),
103
+ # sticky: false,
104
+ # file: 'Source/SwiftLintFramework/Extensions/QueuedPrint.swift',
105
+ # line: 13
106
+ # )
107
+ # expect(@xcode_summary).to have_received(:fail).with(
108
+ # instance_of(String),
109
+ # sticky: false,
110
+ # file: 'Source/SwiftLintFramework/Extensions/QueuedPrint.swift',
111
+ # line: 17
112
+ # )
113
+ # expect(@xcode_summary).to have_received(:fail).with(
114
+ # 'Testing cancelled because the build failed.',
115
+ # sticky: false
116
+ # )
117
+ # end
118
+
119
+ # it 'asserts warning on the line' do
120
+ # allow(@xcode_summary).to receive(:warn)
121
+ # @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
122
+ # expect(@xcode_summary).to have_received(:warn).with(
123
+ # instance_of(String),
124
+ # sticky: false,
125
+ # file: 'Carthage/Checkouts/SWXMLHash/Source/XMLIndexer+XMLIndexerDeserializable.swift',
126
+ # line: 538
127
+ # )
128
+ # end
129
+ # end
130
+
131
+ # context 'with ignores_warnings' do
132
+ # before do
133
+ # @xcode_summary.ignores_warnings = true
134
+ # end
135
+
136
+ # it 'shows no warnings' do
137
+ # @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
138
+ # expect(@dangerfile.status_report[:warnings]).to eq []
139
+ # end
140
+
141
+ # it 'shows errors' do
142
+ # @xcode_summary.report('spec/fixtures/build_error.xcresult')
143
+ # expect(@dangerfile.status_report[:warnings]).to eq []
144
+ # expect(@dangerfile.status_report[:errors].count).to_not eq 0
145
+ # end
146
+
147
+ # it 'reports warning and error counts with no warnings' do
148
+ # result = @xcode_summary.warning_error_count('spec/fixtures/build_error.xcresult')
149
+ # expect(result).to eq '{"warnings":0,"errors":3}'
150
+ # end
151
+ # end
152
+
153
+ # context 'with ignored_results' do
154
+ # before do
155
+ # @xcode_summary.ignored_results do |result|
156
+ # result.message.include?('public extension') || result.message.include?('unresolved')
157
+ # end
158
+ # end
159
+
160
+ # it 'asserts no errors' do
161
+ # @xcode_summary.report('spec/fixtures/build_error.xcresult')
162
+ # expect(@dangerfile.status_report[:errors].count).to eq 1
163
+ # end
164
+
165
+ # it 'asserts no warnings' do
166
+ # @xcode_summary.report('spec/fixtures/swiftlint.xcresult')
167
+ # expect(@dangerfile.status_report[:warnings].count).to eq 19
168
+ # end
169
+
170
+ # it 'report warning and error counts' do
171
+ # result = @xcode_summary.warning_error_count('spec/fixtures/build_error.xcresult')
172
+ # expect(result).to eq '{"warnings":19,"errors":1}'
173
+ # end
174
+ # end
175
+
176
+ # context 'without strict' do
177
+ # before do
178
+ # @xcode_summary.strict = false
179
+ # end
180
+
181
+ # it 'shows errors as warnings' do
182
+ # @xcode_summary.report('spec/fixtures/build_error.xcresult')
183
+ # expect(@dangerfile.status_report[:warnings].count).to_not eq 0
184
+ # expect(@dangerfile.status_report[:errors]).to eq []
185
+ # end
186
+
187
+ # it 'report warning and error counts' do
188
+ # result = @xcode_summary.warning_error_count('spec/fixtures/build_error.xcresult')
189
+ # expect(result).to eq '{"warnings":21,"errors":3}'
190
+ # end
191
+ # end
192
+ # end
193
+ # end
194
194
 
195
195
  # Second environment with different request_source
196
196
  describe 'with bitbucket request_source' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-ikr-xcode_summary
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diogo Tridapalli