Skip to content

Commit

Permalink
Linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
mildm8nnered committed Dec 26, 2024
1 parent ef32218 commit 3d6cf37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion Source/SwiftLintFramework/Coverage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ private extension Set<String> {
private extension Configuration {
func totalNumberOfRules(for mode: LintOrAnalyzeMode) -> Int {
RuleRegistry.shared.totalNumberOfRules(for: mode) + max(rules.customRuleIdentifiers.count - 1, 0)

}
}

Expand Down
7 changes: 3 additions & 4 deletions Tests/SwiftLintFrameworkTests/CoverageTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ final class CoverageTests: SwiftLintTestCase {
func testFinalEnable() throws {
let source = """
// swiftlint:disable direct_return
// swiftlint:enable direct_return
"""
try testCoverage(source: source, observedCoverage: 10, maximumCoverage: 12)
Expand Down Expand Up @@ -174,7 +174,7 @@ final class CoverageTests: SwiftLintTestCase {
func testFinalEnableWithCustomRules() throws {
let source = """
// swiftlint:disable \(Self.customRuleIdentifier1)
// swiftlint:enable \(Self.customRuleIdentifier1)
"""
let enabledRuleIdentifiers = Self.ruleIdentifiers + [CustomRules.identifier]
Expand All @@ -198,7 +198,6 @@ final class CoverageTests: SwiftLintTestCase {
observedCoverage: 13,
maximumCoverage: 15
)

}

func testRuleAliasesCoverage() throws {
Expand Down Expand Up @@ -263,7 +262,7 @@ final class CoverageTests: SwiftLintTestCase {
customRules: [String: [String: String]] = [:],
file: SwiftLintFile
) throws -> Coverage {
var configurationDictionary: [String:Any] = ["only_rules": enabledRuleIdentifiers]
var configurationDictionary: [String: Any] = ["only_rules": enabledRuleIdentifiers]
if customRules.isNotEmpty {
configurationDictionary[CustomRules.identifier] = customRules
}
Expand Down

0 comments on commit 3d6cf37

Please sign in to comment.