From 3444b98f68b956f5c9666194222c7b43ab0cd99a Mon Sep 17 00:00:00 2001 From: eonist <30n1st@gmail.com> Date: Wed, 6 Nov 2024 14:03:16 +0100 Subject: [PATCH] Lint --- Sources/Telemetry/Telemetry+Action.swift | 5 ++--- Tests/TelemetryTests/TelemetryTests.swift | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Sources/Telemetry/Telemetry+Action.swift b/Sources/Telemetry/Telemetry+Action.swift index 3f93ba3..e417abc 100644 --- a/Sources/Telemetry/Telemetry+Action.swift +++ b/Sources/Telemetry/Telemetry+Action.swift @@ -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)") } } @@ -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) diff --git a/Tests/TelemetryTests/TelemetryTests.swift b/Tests/TelemetryTests/TelemetryTests.swift index aa9ec16..c3f4ad2 100644 --- a/Tests/TelemetryTests/TelemetryTests.swift +++ b/Tests/TelemetryTests/TelemetryTests.swift @@ -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