From 629e94c787d9501d3325e3185ffa6b868ff347ea Mon Sep 17 00:00:00 2001 From: Bryan Ricker Date: Tue, 10 Nov 2020 14:14:24 -0800 Subject: [PATCH] chore: rename OverridenSuperCallConfiguration to OverriddenSuperCallConfiguration BREAKING CHANGE: As `OverridenSuperCallConfiguration` is a publicly-exposed struct, this rename should be considered breaking. --- CHANGELOG.md | 5 +++++ .../Rules/Lint/OverriddenSuperCallRule.swift | 2 +- ...guration.swift => OverriddenSuperCallConfiguration.swift} | 2 +- Tests/LinuxMain.swift | 2 +- Tests/SwiftLintFrameworkTests/RuleConfigurationTests.swift | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) rename Source/SwiftLintFramework/Rules/RuleConfigurations/{OverridenSuperCallConfiguration.swift => OverriddenSuperCallConfiguration.swift} (97%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 074996cb7af..4ae45c0bc3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -34,6 +34,11 @@ Defaults to `true`. [Skoti](https://github.com/Skoti) +* Renamed `OverridenSuperCallConfiguration` to + `OverriddenSuperCallConfiguration`. + [Bryan Ricker](https://github.com/bricker) + [#3426](https://github.com/realm/SwiftLint/pull/3426) + #### Experimental * None. diff --git a/Source/SwiftLintFramework/Rules/Lint/OverriddenSuperCallRule.swift b/Source/SwiftLintFramework/Rules/Lint/OverriddenSuperCallRule.swift index 77aad25c08b..dd2b3ed6dac 100644 --- a/Source/SwiftLintFramework/Rules/Lint/OverriddenSuperCallRule.swift +++ b/Source/SwiftLintFramework/Rules/Lint/OverriddenSuperCallRule.swift @@ -1,7 +1,7 @@ import SourceKittenFramework public struct OverriddenSuperCallRule: ConfigurationProviderRule, ASTRule, OptInRule, AutomaticTestableRule { - public var configuration = OverridenSuperCallConfiguration() + public var configuration = OverriddenSuperCallConfiguration() public init() {} diff --git a/Source/SwiftLintFramework/Rules/RuleConfigurations/OverridenSuperCallConfiguration.swift b/Source/SwiftLintFramework/Rules/RuleConfigurations/OverriddenSuperCallConfiguration.swift similarity index 97% rename from Source/SwiftLintFramework/Rules/RuleConfigurations/OverridenSuperCallConfiguration.swift rename to Source/SwiftLintFramework/Rules/RuleConfigurations/OverriddenSuperCallConfiguration.swift index ac5aa40588e..c25d65e8f67 100644 --- a/Source/SwiftLintFramework/Rules/RuleConfigurations/OverridenSuperCallConfiguration.swift +++ b/Source/SwiftLintFramework/Rules/RuleConfigurations/OverriddenSuperCallConfiguration.swift @@ -1,4 +1,4 @@ -public struct OverridenSuperCallConfiguration: RuleConfiguration, Equatable { +public struct OverriddenSuperCallConfiguration: RuleConfiguration, Equatable { private let defaultIncluded = [ //NSObject "awakeFromNib()", diff --git a/Tests/LinuxMain.swift b/Tests/LinuxMain.swift index 15d2311312f..29b59bbce35 100644 --- a/Tests/LinuxMain.swift +++ b/Tests/LinuxMain.swift @@ -1356,7 +1356,7 @@ extension RuleConfigurationTests { ("testTrailingWhitespaceConfigurationApplyConfigurationSetsIgnoresComments", testTrailingWhitespaceConfigurationApplyConfigurationSetsIgnoresComments), ("testTrailingWhitespaceConfigurationCompares", testTrailingWhitespaceConfigurationCompares), ("testTrailingWhitespaceConfigurationApplyConfigurationUpdatesSeverityConfiguration", testTrailingWhitespaceConfigurationApplyConfigurationUpdatesSeverityConfiguration), - ("testOverridenSuperCallConfigurationFromDictionary", testOverridenSuperCallConfigurationFromDictionary), + ("testOverriddenSuperCallConfigurationFromDictionary", testOverriddenSuperCallConfigurationFromDictionary), ("testModifierOrderConfigurationFromDictionary", testModifierOrderConfigurationFromDictionary), ("testModifierOrderConfigurationThrowsOnUnrecognizedModifierGroup", testModifierOrderConfigurationThrowsOnUnrecognizedModifierGroup), ("testModifierOrderConfigurationThrowsOnNonModifiableGroup", testModifierOrderConfigurationThrowsOnNonModifiableGroup), diff --git a/Tests/SwiftLintFrameworkTests/RuleConfigurationTests.swift b/Tests/SwiftLintFrameworkTests/RuleConfigurationTests.swift index a2b6a0085a0..acec6f4fecc 100644 --- a/Tests/SwiftLintFrameworkTests/RuleConfigurationTests.swift +++ b/Tests/SwiftLintFrameworkTests/RuleConfigurationTests.swift @@ -274,8 +274,8 @@ class RuleConfigurationTests: XCTestCase { } } - func testOverridenSuperCallConfigurationFromDictionary() { - var configuration = OverridenSuperCallConfiguration() + func testOverriddenSuperCallConfigurationFromDictionary() { + var configuration = OverriddenSuperCallConfiguration() XCTAssertTrue(configuration.resolvedMethodNames.contains("viewWillAppear(_:)")) let conf1 = ["severity": "error", "excluded": "viewWillAppear(_:)"]