Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow to pass the danger instance and the file path #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Sources/DangerXCodeSummary/XCodeSummary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public final class XCodeSummary {
self.resultsFilter = resultsFilter
}

public convenience init(filePath: String, resultsFilter: ResultsFilter? = nil) {
public convenience init(filePath: String, dsl: DangerDSL = Danger(), resultsFilter: ResultsFilter? = nil) {
guard let content = try? String(contentsOfFile: filePath),
let data = content.data(using: .utf8) else {
fatalError("Report not found")
Expand All @@ -95,7 +95,7 @@ public final class XCodeSummary {
fatalError("Report file is not a valid json")
}

self.init(json: json, dsl: Danger(), resultsFilter: resultsFilter)
self.init(json: json, dsl: dsl, resultsFilter: resultsFilter)
}

/// Shows all build errors, warnings and unit tests results generated from `xcodebuild` or `Swift Package Manager`
Expand Down