Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit

Permalink
Disable SwiftLint rule nesting
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandroboron committed Dec 16, 2024
1 parent 76397dc commit 2096a74
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ extension MaliciousSiteProtectionManager {

struct EmbeddedDataProvider: MaliciousSiteProtection.EmbeddedDataProviding {

// swiftlint:disable:next nesting
private enum Constants {
static let embeddedDataRevision = 1696473
static let phishingEmbeddedHashPrefixDataSHA = "cdb609c37e950b7d0dcdaa80ae4071cf2c87223cfdd189caafae723722bd3158"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ final class MockMaliciousSiteDataProvider: MaliciousSiteProtection.EmbeddedDataP
}
}

// swiftlint:disable:next force_try
func hash(for dataType: MaliciousSiteProtection.DataManager.StoredDataType) -> String {

Check failure on line 47 in DuckDuckGoTests/MaliciousSiteProtection/Mocks/MaliciousSiteProtectionMocks.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

SwiftLint rule 'force_try' did not trigger a violation in the disabled region; remove the disable command (superfluous_disable_command)
let url = url(for: dataType)
let data = try! data(withContentsOf: url)

Check failure on line 49 in DuckDuckGoTests/MaliciousSiteProtection/Mocks/MaliciousSiteProtectionMocks.swift

View workflow job for this annotation

GitHub Actions / SwiftLint

Force tries should be avoided (force_try)
Expand Down

0 comments on commit 2096a74

Please sign in to comment.