danger-swiftlint 0.14.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/lib/danger_plugin.rb +2 -2
- data/lib/version.rb +1 -1
- data/spec/danger_plugin_spec.rb +26 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 01a0939fa22887ccd7c5fb12e95137480358a86b29fa5172013fcab5c4a641e8
|
4
|
+
data.tar.gz: fd0159f18351b1024d8a0375da700490a1fb65bf854b1afc43d9353129050ba6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d4ab4971ad7ce9ec8534f1640e6fb6d0ab9ab5ebc150fb3978bf0f2090969ea51af28982d920fb791a579a19ab8a938ce4bea2971b3183473ff30ac00ff5b01e
|
7
|
+
data.tar.gz: 2d2dda5c3ce69edc438d2054a52ecbb13dd0479dcc116c1c4981393328f2134d69c27790160ac2f5a16e5c67b12739aa311fae403cb7db6793eaca87ff7b884f
|
data/lib/danger_plugin.rb
CHANGED
@@ -98,8 +98,8 @@ module Danger
|
|
98
98
|
|
99
99
|
if inline_mode
|
100
100
|
# Report with inline comment
|
101
|
-
send_inline_comment(warnings,
|
102
|
-
send_inline_comment(errors,
|
101
|
+
send_inline_comment(warnings, :warn)
|
102
|
+
send_inline_comment(errors, fail_on_error ? :fail : :warn)
|
103
103
|
warn other_issues_message(other_issues_count) if other_issues_count > 0
|
104
104
|
elsif warnings.count > 0 || errors.count > 0
|
105
105
|
# Report if any warning or error
|
data/lib/version.rb
CHANGED
data/spec/danger_plugin_spec.rb
CHANGED
@@ -282,17 +282,40 @@ module Danger
|
|
282
282
|
@swiftlint.lint_files
|
283
283
|
end
|
284
284
|
|
285
|
-
it 'generates errors instead of markdown when use inline mode' do
|
285
|
+
it 'generates errors/warnings instead of markdown when use inline mode' do
|
286
286
|
allow_any_instance_of(Swiftlint).to receive(:lint)
|
287
287
|
.with(hash_including(path: File.expand_path('spec/fixtures/SwiftFile.swift')), '')
|
288
288
|
.and_return(@swiftlint_response)
|
289
289
|
|
290
|
-
@swiftlint.lint_files('spec/fixtures/*.swift', inline_mode: true,
|
290
|
+
@swiftlint.lint_files('spec/fixtures/*.swift', inline_mode: true, additional_swiftlint_args: '')
|
291
291
|
|
292
292
|
status = @swiftlint.status_report
|
293
|
-
expect(status[:errors]).to_not be_empty
|
293
|
+
expect(status[:errors] + status[:warnings]).to_not be_empty
|
294
294
|
expect(status[:markdowns]).to be_empty
|
295
295
|
end
|
296
|
+
|
297
|
+
it 'generate errors in inline_mode when fail_on_error' do
|
298
|
+
allow_any_instance_of(Swiftlint).to receive(:lint)
|
299
|
+
.with(hash_including(path: File.expand_path('spec/fixtures/SwiftFile.swift')), '')
|
300
|
+
.and_return(@swiftlint_response)
|
301
|
+
|
302
|
+
@swiftlint.lint_files('spec/fixtures/*.swift', inline_mode: true, fail_on_error: true, additional_swiftlint_args: '')
|
303
|
+
|
304
|
+
status = @swiftlint.status_report
|
305
|
+
expect(status[:errors]).to_not be_empty
|
306
|
+
end
|
307
|
+
|
308
|
+
it 'generate only warnings in inline_mode when fail_on_error is false' do
|
309
|
+
allow_any_instance_of(Swiftlint).to receive(:lint)
|
310
|
+
.with(hash_including(path: File.expand_path('spec/fixtures/SwiftFile.swift')), '')
|
311
|
+
.and_return(@swiftlint_response)
|
312
|
+
|
313
|
+
@swiftlint.lint_files('spec/fixtures/*.swift', inline_mode: true, fail_on_error: false, additional_swiftlint_args: '')
|
314
|
+
|
315
|
+
status = @swiftlint.status_report
|
316
|
+
expect(status[:warnings]).to_not be_empty
|
317
|
+
expect(status[:errors]).to be_empty
|
318
|
+
end
|
296
319
|
end
|
297
320
|
end
|
298
321
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-swiftlint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.15.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ash Furrow
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2018-03-
|
15
|
+
date: 2018-03-26 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: danger
|
@@ -181,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
181
181
|
version: '0'
|
182
182
|
requirements: []
|
183
183
|
rubyforge_project:
|
184
|
-
rubygems_version: 2.6
|
184
|
+
rubygems_version: 2.7.6
|
185
185
|
signing_key:
|
186
186
|
specification_version: 4
|
187
187
|
summary: A Danger plugin for linting Swift with SwiftLint.
|