Skip to content

Commit

Permalink
fix: format and lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoweii committed Dec 12, 2023
1 parent 929bbc6 commit 2f44e47
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion Sources/Clickstream/ClickstreamObjc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ import Foundation
try ClickstreamAnalytics.getClickstreamConfiguration()
}


private static func getItems(_ items: [NSDictionary]) -> [ClickstreamAttribute] {
var resultItems: [ClickstreamAttribute] = []
for item in items {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ class AnalyticsClient: AnalyticsClientBehaviour {
}

func addUserAttribute(_ attribute: AttributeValue, forKey key: String) {
let eventError = Event.checkUserAttribute(currentNumber: allUserAttributes.count, key: key, value: attribute)
let eventError = EventChecker.checkUserAttribute(currentNumber: allUserAttributes.count,
key: key,
value: attribute)
if eventError.errorCode > 0 {
recordEventError(eventError)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,9 @@ class EventChecker {
error.errorMessage = getErrorMessage(key)
}
}
if error.errorCode == Event.ErrorCode.NO_ERROR, valueString.utf8.count > Event.Limit.MAX_LENGTH_OF_ITEM_VALUE {
if error.errorCode == Event.ErrorCode.NO_ERROR,
valueString.utf8.count > Event.Limit.MAX_LENGTH_OF_ITEM_VALUE
{
errorMsg = """
item attribute : \(key), reached the max length of item attribute value limit (
\(Event.Limit.MAX_LENGTH_OF_ITEM_VALUE). current length is: (\(valueString.utf8.count))
Expand Down

0 comments on commit 2f44e47

Please sign in to comment.