From 09611985c3ae4b3df0510f781403430d5477411f Mon Sep 17 00:00:00 2001 From: Bartek Waresiak Date: Fri, 22 Nov 2024 17:06:11 +0100 Subject: [PATCH] Fix lint errors --- .../ContentBlocking/ContentBlockerRulesManager.swift | 10 +++++----- .../ContentBlockerRulesManagerTests.swift | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Sources/BrowserServicesKit/ContentBlocking/ContentBlockerRulesManager.swift b/Sources/BrowserServicesKit/ContentBlocking/ContentBlockerRulesManager.swift index efc0b0080..98934f9c4 100644 --- a/Sources/BrowserServicesKit/ContentBlocking/ContentBlockerRulesManager.swift +++ b/Sources/BrowserServicesKit/ContentBlocking/ContentBlockerRulesManager.swift @@ -152,7 +152,7 @@ public class ContentBlockerRulesManager: CompiledRuleListsSource { if !self.lookupCompiledRules() { if let lastCompiledRules = lastCompiledRulesStore?.rules, !lastCompiledRules.isEmpty { - if(self.fetchLastCompiledRules(with: lastCompiledRules)) { + if self.fetchLastCompiledRules(with: lastCompiledRules) { self.errorReporting?.fire(.contentBlockingFetchLRCSucceeded) } else { self.errorReporting?.fire(.contentBlockingNoMatchInLRC) @@ -282,7 +282,7 @@ public class ContentBlockerRulesManager: CompiledRuleListsSource { mutex.wait() let rulesFound = initialCompilationTask.getFetchedRules() - + if let rules = rulesFound { applyRules(rules) } else { @@ -293,7 +293,7 @@ public class ContentBlockerRulesManager: CompiledRuleListsSource { // No matter if rules were found or not, we need to schedule recompilation, after all scheduleCompilation() - + return rulesFound != nil } @@ -389,8 +389,8 @@ public class ContentBlockerRulesManager: CompiledRuleListsSource { } // if task is main tds task, extract time and iteration count from the result and fire the pixel - //can result be a struct? can we add fields to compliatiotask instead? - //can we sen dpixels from compialtion task? + // can result be a struct? can we add fields to compliatiotask instead? + // can we sen dpixels from compialtion task? changes[task.rulesList.name] = diff return rules } diff --git a/Tests/BrowserServicesKitTests/ContentBlocker/ContentBlockerRulesManagerTests.swift b/Tests/BrowserServicesKitTests/ContentBlocker/ContentBlockerRulesManagerTests.swift index 317ae5a5f..15321e1ba 100644 --- a/Tests/BrowserServicesKitTests/ContentBlocker/ContentBlockerRulesManagerTests.swift +++ b/Tests/BrowserServicesKitTests/ContentBlocker/ContentBlockerRulesManagerTests.swift @@ -203,7 +203,7 @@ class ContentBlockerRulesManagerLoadingTests: ContentBlockerRulesManagerTests { let errorExp = expectation(description: "No error reported") errorExp.isInverted = true - + let lookupAndFetchExp = expectation(description: "Look and Fetch rules failed") let compilationTimeExp = expectation(description: "Compilation Time reported") let errorHandler = EventMapping { event, _, params, _ in @@ -547,7 +547,7 @@ class ContentBlockerRulesManagerLoadingTests: ContentBlockerRulesManagerTests { let errorExp = expectation(description: "Error reported") errorExp.expectedFulfillmentCount = 5 - + let lookupAndFetchExp = expectation(description: "Look and Fetch rules failed") var errorEvents = [ContentBlockerDebugEvents.Component]()