Skip to content

Commit

Permalink
Fix existing violations
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelofabri committed May 1, 2022
1 parent b070492 commit e139326
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ internal extension Configuration.FileGraph.FilePath {
// MARK: Caching
private func getCachedFilePath(urlString: String, rootDirectory: String) -> String? {
let path = filePath(for: urlString, rootDirectory: rootDirectory)
return FileManager.default.fileExists(atPath: path) ? path: nil
return FileManager.default.fileExists(atPath: path) ? path : nil
}

private func cache(configString: String, from urlString: String, rootDirectory: String) -> String? {
Expand All @@ -209,7 +209,7 @@ internal extension Configuration.FileGraph.FilePath {
atPath: path,
contents: Data(configString.utf8),
attributes: [:]
) ? path: nil
) ? path : nil
}

private func filePath(for urlString: String, rootDirectory: String) -> String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public struct CodeClimateReporter: Reporter {
"end": violation.location.line ?? NSNull() as Any
]
],
"severity": violation.severity == .error ? "MAJOR": "MINOR",
"severity": violation.severity == .error ? "MAJOR" : "MINOR",
"type": "issue"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public struct SonarQubeReporter: Reporter {
]
],
"type": "CODE_SMELL",
"severity": violation.severity == .error ? "MAJOR": "MINOR"
"severity": violation.severity == .error ? "MAJOR" : "MINOR"
]
}
}

0 comments on commit e139326

Please sign in to comment.