Skip to content

Commit

Permalink
Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 committed Oct 22, 2018
1 parent cb00207 commit 37411e2
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Sources/LicensePlist/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ private func loadConfig(configPath: URL) -> Config {
return Config.empty
}

let main = command(Option("cartfile-path", Consts.cartfileName),
Option("pods-path", Consts.podsDirectoryName),
Option("output-path", Consts.outputPath),
Option("github-token", ""),
Option("config-path", Consts.configPath),
let main = command(Option("cartfile-path", default: Consts.cartfileName),
Option("pods-path", default: Consts.podsDirectoryName),
Option("output-path", default: Consts.outputPath),
Option("github-token", default: ""),
Option("config-path", default: Consts.configPath),
Flag("force"),
Flag("add-version-numbers"),
Flag("suppress-opening-directory")) { cartfile, podsPath, output, gitHubToken, configPath, force, version, suppressOpen in
Expand Down
2 changes: 1 addition & 1 deletion Sources/LicensePlistCore/Entity/CocoaPodsLicense.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public struct CocoaPodsLicense: License, Equatable {

extension CocoaPodsLicense: CustomStringConvertible {
public var description: String {
return "name: \(library.name), nameSpecified: \(nameSpecified ?? "")\nbody: \(String(body.characters.prefix(20)))\nversion: \(version ?? "")"
return "name: \(library.name), nameSpecified: \(nameSpecified ?? "")\nbody: \(String(body.prefix(20)))\nversion: \(version ?? "")"
}
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/LicensePlistCore/Entity/GitHub.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ extension GitHub {
let version = nsContent.substring(with: match.rangeAt(3))
let pattern = try! NSRegularExpression(pattern: "\\w{40}", options: [])
if !pattern.matches(in: version, options: [], range: NSRange(location: 0, length: (version as NSString).length)).isEmpty {
return String(version.characters.prefix(7))
return String(version.prefix(7))
}
return version
}()
Expand Down
2 changes: 1 addition & 1 deletion Sources/LicensePlistCore/Entity/ManualLicense.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension ManualLicense: CustomStringConvertible {
"nameSpecified: \(library.nameSpecified ?? "")",
"version: \(library.version ?? "")"]
.joined(separator: ", "),
"body: \(String(body.characters.prefix(20)))"]
"body: \(String(body.prefix(20)))"]
.joined(separator: "\n")
}
}
Expand Down

0 comments on commit 37411e2

Please sign in to comment.