Add Swiftlint
Some checks failed
gitea-openium/resgen.swift/pipeline/head There was a failure building this commit

This commit is contained in:
2023-12-08 17:10:21 +01:00
parent 92626b76ad
commit abb7c8f8c8
23 changed files with 157 additions and 50 deletions

View File

@ -18,7 +18,6 @@ struct Analytics: ParsableCommand {
version: ResgenSwiftVersion
)
// MARK: - Static
static let toolName = "Analytics"

View File

@ -25,7 +25,7 @@ class AnalyticsDefinition {
}
func hasOneOrMoreMatchingTags(inputTags: [String]) -> Bool {
if Set(inputTags).intersection(Set(self.tags)).isEmpty {
if Set(inputTags).isDisjoint(with: tags) {
return false
}
return true
@ -47,7 +47,7 @@ class AnalyticsDefinition {
var result: String
if type == .screen {
params = params.filter{ param in
params = params.filter { param in
!param.replaceIn.isEmpty
}
}
@ -71,7 +71,7 @@ class AnalyticsDefinition {
return result
}
private func replaceIn(){
private func replaceIn() {
for parameter in parameters {
for rep in parameter.replaceIn {
switch rep {