danger-xcode_summary 0.1.0 → 0.1.1
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 +4 -4
- data/Gemfile +1 -1
- data/README.md +1 -1
- data/lib/xcode_summary/gem_version.rb +1 -1
- data/lib/xcode_summary/plugin.rb +10 -4
- data/spec/fixtures/summary_with_empty_line.json +37 -0
- data/spec/xcode_summary_spec.rb +9 -0
- metadata +5 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7160cc7c92845abecec316007f22b340e478d388
|
|
4
|
+
data.tar.gz: ee0d0752692b8ac7b177a1004fb4ac29c9e63ef7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8384d1ebcfda002f5a9a19b4b8f4594189460fc1d8bde87c2f8b616df68071b61353c20d76ec4ad872e692a25adb097231eb0167c5fd062a380f7f9c9d0fd88b
|
|
7
|
+
data.tar.gz: 96be4fdf6814c92709af16c0ce74f568dd8465fd56f1c5be90d75c627f0e773719a35c23cc8192faf4da84a091f26923c8d146095bc4761aa7d32d4e2d5fc146
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# danger-xcode_summary
|
|
2
2
|
|
|
3
3
|
[](LICENSE.txt)
|
|
4
|
-
[](https://badge.fury.io/rb/danger-xcode_summary)
|
|
5
5
|
[](https://travis-ci.org/diogot/danger-xcode_summary)
|
|
6
6
|
|
|
7
7
|
A [Danger](http://danger.systems) plugin that shows all build errors, warnings and unit tests results generated from `xcodebuild`.
|
data/lib/xcode_summary/plugin.rb
CHANGED
|
@@ -133,10 +133,16 @@ module Danger
|
|
|
133
133
|
return nil if should_ignore_warning?(path)
|
|
134
134
|
|
|
135
135
|
path_link = format_path(path)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
136
|
+
|
|
137
|
+
warning = "**#{path_link}**: #{escape_reason(h[:reason])} <br />"
|
|
138
|
+
if h[:line] && !h[:line].empty?
|
|
139
|
+
"#{warning}" \
|
|
140
|
+
"```\n" \
|
|
141
|
+
"#{h[:line]}\n" \
|
|
142
|
+
'```'
|
|
143
|
+
else
|
|
144
|
+
warning
|
|
145
|
+
end
|
|
140
146
|
end
|
|
141
147
|
|
|
142
148
|
def format_format_file_missing_error(h)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"warnings": [
|
|
3
|
+
|
|
4
|
+
],
|
|
5
|
+
"ld_warnings": [
|
|
6
|
+
|
|
7
|
+
],
|
|
8
|
+
"compile_warnings": [
|
|
9
|
+
{
|
|
10
|
+
"file_name": "AppDelegate.swift",
|
|
11
|
+
"file_path": "/Users/marcelofabri/Developer/MyAwesomeProject/MyAwesomeProject/Classes/AppDelegate.swift:10001:",
|
|
12
|
+
"reason": "File should contain 400 lines or less: currently contains 10001",
|
|
13
|
+
"line": "",
|
|
14
|
+
"cursor": "^"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"errors": [
|
|
18
|
+
|
|
19
|
+
],
|
|
20
|
+
"compile_errors": [
|
|
21
|
+
|
|
22
|
+
],
|
|
23
|
+
"file_missing_errors": [
|
|
24
|
+
|
|
25
|
+
],
|
|
26
|
+
"undefined_symbols_errors": [
|
|
27
|
+
|
|
28
|
+
],
|
|
29
|
+
"duplicate_symbols_errors": [
|
|
30
|
+
|
|
31
|
+
],
|
|
32
|
+
"tests_failures": {
|
|
33
|
+
},
|
|
34
|
+
"tests_summary_messages": [
|
|
35
|
+
"\t Executed 4 tests, with 0 failures (0 unexpected) in 0.012 (0.017) seconds\n"
|
|
36
|
+
]
|
|
37
|
+
}
|
data/spec/xcode_summary_spec.rb
CHANGED
|
@@ -51,6 +51,15 @@ module Danger
|
|
|
51
51
|
]
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
it 'formats compile warnings with empty line' do
|
|
55
|
+
@xcode_summary.report('spec/fixtures/summary_with_empty_line.json')
|
|
56
|
+
expect(@dangerfile.status_report[:warnings]).to eq [
|
|
57
|
+
# rubocop:disable LineLength
|
|
58
|
+
"**<a href='https://github.com/diogot/danger-xcode_summary/blob/129jef029jf029fj2039fj203f92/Users/marcelofabri/Developer/MyAwesomeProject/MyAwesomeProject/Classes/AppDelegate.swift#L10001'>/Users/marcelofabri/Developer/MyAwesomeProject/MyAwesomeProject/Classes/AppDelegate.swift#L10001</a>**: File should contain 400 lines or less: currently contains 10001 <br />"
|
|
59
|
+
# rubocop:enable LineLength
|
|
60
|
+
]
|
|
61
|
+
end
|
|
62
|
+
|
|
54
63
|
it 'ignores file when ignored_files matches' do
|
|
55
64
|
@xcode_summary.ignored_files = '**/Pods/**'
|
|
56
65
|
@xcode_summary.report('spec/fixtures/summary.json')
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: danger-xcode_summary
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Diogo Tridapalli
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2017-01-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: danger-plugin-api
|
|
@@ -147,6 +147,7 @@ files:
|
|
|
147
147
|
- lib/xcode_summary/plugin.rb
|
|
148
148
|
- spec/fixtures/summary.json
|
|
149
149
|
- spec/fixtures/summary_messages.json
|
|
150
|
+
- spec/fixtures/summary_with_empty_line.json
|
|
150
151
|
- spec/fixtures/test_errors.json
|
|
151
152
|
- spec/spec_helper.rb
|
|
152
153
|
- spec/xcode_summary_spec.rb
|
|
@@ -170,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
170
171
|
version: '0'
|
|
171
172
|
requirements: []
|
|
172
173
|
rubyforge_project:
|
|
173
|
-
rubygems_version: 2.6.
|
|
174
|
+
rubygems_version: 2.6.8
|
|
174
175
|
signing_key:
|
|
175
176
|
specification_version: 4
|
|
176
177
|
summary: A [Danger](http://danger.systems) plugin that shows all build errors, warnings
|
|
@@ -178,6 +179,7 @@ summary: A [Danger](http://danger.systems) plugin that shows all build errors, w
|
|
|
178
179
|
test_files:
|
|
179
180
|
- spec/fixtures/summary.json
|
|
180
181
|
- spec/fixtures/summary_messages.json
|
|
182
|
+
- spec/fixtures/summary_with_empty_line.json
|
|
181
183
|
- spec/fixtures/test_errors.json
|
|
182
184
|
- spec/spec_helper.rb
|
|
183
185
|
- spec/xcode_summary_spec.rb
|