Skip to content

Commit 91a1190

Browse files
committed
Update README for new release
1 parent bfc5740 commit 91a1190

File tree

1 file changed

+9
-29
lines changed

1 file changed

+9
-29
lines changed

README.md

Lines changed: 9 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,6 @@
66

77
A [Danger](http://danger.systems) plugin that shows all build errors, warnings and unit tests results generated from `xcodebuild`.
88

9-
You need to use [xcpretty](https://github.com/supermarin/xcpretty) with
10-
[xcpretty-json-formatter](https://github.com/marcelofabri/xcpretty-json-formatter)
11-
to generate a JSON file that this plugin can read.
12-
13-
**Using [danger-swift](https://github.com/danger/swift)**? You may want to take a look at [danger-swift-xcodesummary](https://github.com/f-meloni/danger-swift-xcodesummary).
14-
159
## How does it look?
1610

1711
<table>
@@ -62,24 +56,6 @@ to generate a JSON file that this plugin can read.
6256
</tbody>
6357
</table>
6458

65-
<table>
66-
<thead>
67-
<tr>
68-
<th width="50"></th>
69-
<th width="100%">
70-
1 Message
71-
</th>
72-
</tr>
73-
</thead>
74-
<tbody>
75-
<tr>
76-
<td><g-emoji alias="book" fallback-src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f4d6.png">📖</g-emoji></td>
77-
<td>Executed 5 tests, with 1 failure (0 unexpected) in 0.032 (0.065) seconds</td>
78-
</tr>
79-
</tr>
80-
</tbody>
81-
</table>
82-
8359
## Installation
8460

8561
Add this line to your Gemfile:
@@ -93,9 +69,13 @@ gem 'danger-xcode_summary'
9369
Just add this line to your `Dangerfile`:
9470

9571
```ruby
96-
xcode_summary.report 'xcodebuild.json'
72+
xcode_summary.report 'MyApp.xcresult'
9773
```
9874

75+
You need to pass the path of the `xcresult` generated after compiling your app.
76+
By default, this is inside the `DerivedData` for your project, but you can use the `-resultBundlePath`
77+
flag when calling `xcodebuild` to customize its path. You can read more about it in this [blog post from the folks at PSPDFKit](https://pspdfkit.com/blog/2021/deflaking-ci-tests-with-xcresults/#using-xcresult-bundles).
78+
9979
You can also ignore warnings from certain files by setting `ignored_files`:
10080
Warning: `ignored_files` patterns applied on relative paths.
10181

@@ -105,10 +85,10 @@ xcode_summary.ignored_files = 'Pods/**'
10585

10686
# Ignoring specific warnings
10787
xcode_summary.ignored_results { |result|
108-
result.message.start_with? 'ld' # Ignore ld_warnings
88+
result.message.include? 'ld' # Ignore ld_warnings
10989
}
11090

111-
xcode_summary.report 'xcodebuild.json'
91+
xcode_summary.report 'MyApp.xcresult'
11292
```
11393

11494
You can use `ignores_warnings` to supress warnings and shows only errors.
@@ -123,13 +103,13 @@ When this value is enabled, each warnings and errors are commented on each lines
123103
```ruby
124104
# Comment on each lines
125105
xcode_summary.inline_mode = true
126-
xcode_summary.report 'xcodebuild.json'
106+
xcode_summary.report 'MyApp.xcresult'
127107
```
128108

129109
You can get warning and error number by calling `warning_error_count`. The return will be a JSON string contains warning and error count, e.g {"warnings":1,"errors":3}:
130110

131111
```ruby
132-
result = xcode_summary.warning_error_count 'xcodebuild.json'
112+
result = xcode_summary.warning_error_count 'MyApp.xcresult'
133113
```
134114

135115
## License

0 commit comments

Comments
 (0)