Skip to content

Commit

Permalink
Move to SPM deserved a first version
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex da Franca committed Aug 2, 2021
1 parent 316590c commit fcaf459
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ The output format. It can be either 'txt', 'cli', 'html' or 'xml'. In case of 'x
is used.
-p, --project-root <project-root>
The name of the project root. If present paths and urls are relative to the specified directory.
-c, --coverage Whether to print coverage data.
-v, --version Print version.
-c, --coverage Whether to print coverage data.
-q, --quiet Quiet. Don't print status output.
-h, --help Show help information.
```
Expand Down
13 changes: 1 addition & 12 deletions xcresultparser/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import Foundation
import ArgumentParser

private let marketingVersion = "0.2"
private let marketingVersion = "1.0"

struct xcresultparser: ParsableCommand {
static let configuration = CommandConfiguration(
Expand All @@ -24,20 +24,13 @@ struct xcresultparser: ParsableCommand {
@Flag(name: .shortAndLong, help: "Whether to print coverage data.")
var coverage: Int

@Flag(name: .shortAndLong, help: "Print version.")
var version: Int

@Flag(name: .shortAndLong, help: "Quiet. Don't print status output.")
var quiet: Int

@Argument(help: "The path to the .xcresult file.")
var xcresultFile: String

mutating func run() throws {
guard version != 1 else {
printVersion()
return
}
if format == .xml {
if coverage == 1 {
try outputSonarXML()
Expand All @@ -49,10 +42,6 @@ struct xcresultparser: ParsableCommand {
}
}

private func printVersion() {
writeToStdOutLn("xcresultparser \(marketingVersion)")
}

private func outputSonarXML() throws {
guard let converter = CoverageConverter(with: URL(fileURLWithPath: xcresultFile), projectRoot: projectRoot ?? "") else {
throw ParseError.argumentError
Expand Down

0 comments on commit fcaf459

Please sign in to comment.