Skip to content

Commit

Permalink
Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
eonist committed Nov 6, 2024
1 parent 3f01a92 commit 3444b98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions Sources/Telemetry/Telemetry+Action.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ extension Telemetry {
case TMType.agg(let agg): // If the telemetry type is not Google Analytics,
do {
try agg.append(action: action) // append the action to the aggregator
}
catch { // Catch and print any errors that occur when appending the action
} catch { // Catch and print any errors that occur when appending the action
Swift.print("Error: \(error.localizedDescription)")
}
}
Expand Down Expand Up @@ -57,7 +56,7 @@ extension Telemetry {
// Generate a URL with the arguments, return if URL generation fails
guard let url: URL = Self.getURL(with: arguments) else { return }
// Create a data task with the URL
let task: URLSessionDataTask = session.dataTask(with: url) { (_ : Data?, _ : URLResponse?, error: Error?) in
let task: URLSessionDataTask = session.dataTask(with: url) { (_: Data?, _: URLResponse?, error: Error?) in
// If there is an error, print it and call the completion handler with false
if let errorResponse: String = error?.localizedDescription {
Swift.print("⚠️️ Failed to deliver GA Request. ", errorResponse)
Expand Down
2 changes: 1 addition & 1 deletion Tests/TelemetryTests/TelemetryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ extension TelemetryTests {
// Set the identifier type for the Telemetry
Telemetry.idType = .userdefault // vendor doesn't work on mac or command-line-unit-test, and keychain doesnt work in comandline-unit-tests in an easy way
// Set the tracker ID for the Telemetry
Telemetry.trackerId = "UA-XXXXX-XX" //"" // Use real ga-tracker-id here, to test properly etc
Telemetry.trackerId = "UA-XXXXX-XX" // "" // Use real ga-tracker-id here, to test properly etc
// Create an expectation for a screen view function
let screenView = testCase.expectation(description: "screen view function")
// Call the screen view function and print whether it was successful
Expand Down

0 comments on commit 3444b98

Please sign in to comment.