Retours sur la structure du code
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit
This commit is contained in:
@ -33,6 +33,10 @@ struct Analytics: ParsableCommand {
|
||||
mutating func run() {
|
||||
print("[\(Self.toolName)] Starting analytics generation")
|
||||
print("[\(Self.toolName)] Will use inputFile \(options.inputFile) to generate analytics for target: \(options.target)")
|
||||
|
||||
// Check requirements
|
||||
guard checkRequirements() else { return }
|
||||
|
||||
print("[\(Self.toolName)] Will generate analytics")
|
||||
|
||||
// Check requirements
|
||||
@ -76,18 +80,11 @@ struct Analytics: ParsableCommand {
|
||||
}
|
||||
}
|
||||
|
||||
extension Analytics {
|
||||
enum TargetType: CaseIterable {
|
||||
case matomo
|
||||
case firebase
|
||||
|
||||
var value: String {
|
||||
switch self {
|
||||
case .matomo:
|
||||
"matomo"
|
||||
case .firebase:
|
||||
"firebase"
|
||||
}
|
||||
}
|
||||
// MARK: - Requirements
|
||||
|
||||
private func checkRequirements() -> Bool {
|
||||
// Check les requirements et gestion des erreurs
|
||||
// Il faut que toutes les erreurs générées par Analytics soit des AnalyticsError
|
||||
true
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user