Skip to content

Commit

Permalink
Revert "Add prohibited_nan_comparison opt-in rule (#3089)"
Browse files Browse the repository at this point in the history
This reverts commit fdd16a6.
  • Loading branch information
jpsim committed Feb 11, 2020
1 parent bd7b2ba commit 743853c
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 122 deletions.
5 changes: 0 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@
[Zsolt Kovács](https://github.com/lordzsolt)
[#827](https://github.com/realm/SwiftLint/issues/827)

* Add `prohibited_nan_comparison` opt-in rule to validate using `isNaN`
instead of comparing values to the `.nan` constant.
[Marcelo Fabri](https://github.com/marcelofabri)
[#2086](https://github.com/realm/SwiftLint/issues/2086)

#### Bug Fixes

* Fix `discarded_notification_center_observer` false positives when
Expand Down
1 change: 0 additions & 1 deletion Source/SwiftLintFramework/Models/MasterRuleList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ public let masterRuleList = RuleList(rules: [
OverriddenSuperCallRule.self,
OverrideInExtensionRule.self,
PatternMatchingKeywordsRule.self,
PhohibitedNaNComparisonRule.self,
PreferSelfTypeOverTypeOfSelfRule.self,
PrefixedTopLevelConstantRule.self,
PrivateActionRule.self,
Expand Down

This file was deleted.

4 changes: 0 additions & 4 deletions SwiftLint.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@
D40AD08A1E032F9700F48C30 /* UnusedClosureParameterRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40AD0891E032F9700F48C30 /* UnusedClosureParameterRule.swift */; };
D40E041C1F46E3B30043BC4E /* SuperfluousDisableCommandRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40E041B1F46E3B30043BC4E /* SuperfluousDisableCommandRule.swift */; };
D40F83881DE9179200524C62 /* TrailingCommaConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40F83871DE9179200524C62 /* TrailingCommaConfiguration.swift */; };
D40F8B6723E6D60E00A5218E /* PhohibitedNaNComparisonRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40F8B6623E6D60E00A5218E /* PhohibitedNaNComparisonRule.swift */; };
D40FE89D1F867BFF006433E2 /* OverrideInExtensionRule.swift in Sources */ = {isa = PBXBuildFile; fileRef = D40FE89C1F867BFF006433E2 /* OverrideInExtensionRule.swift */; };
D4130D971E16183F00242361 /* IdentifierNameRuleExamples.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4130D961E16183F00242361 /* IdentifierNameRuleExamples.swift */; };
D4130D991E16CC1300242361 /* TypeNameRuleExamples.swift in Sources */ = {isa = PBXBuildFile; fileRef = D4130D981E16CC1300242361 /* TypeNameRuleExamples.swift */; };
Expand Down Expand Up @@ -794,7 +793,6 @@
D40AD0891E032F9700F48C30 /* UnusedClosureParameterRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UnusedClosureParameterRule.swift; sourceTree = "<group>"; };
D40E041B1F46E3B30043BC4E /* SuperfluousDisableCommandRule.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SuperfluousDisableCommandRule.swift; sourceTree = "<group>"; };
D40F83871DE9179200524C62 /* TrailingCommaConfiguration.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrailingCommaConfiguration.swift; sourceTree = "<group>"; };
D40F8B6623E6D60E00A5218E /* PhohibitedNaNComparisonRule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhohibitedNaNComparisonRule.swift; sourceTree = "<group>"; };
D40FE89C1F867BFF006433E2 /* OverrideInExtensionRule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OverrideInExtensionRule.swift; sourceTree = "<group>"; };
D4130D961E16183F00242361 /* IdentifierNameRuleExamples.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IdentifierNameRuleExamples.swift; sourceTree = "<group>"; };
D4130D981E16CC1300242361 /* TypeNameRuleExamples.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TypeNameRuleExamples.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1200,7 +1198,6 @@
094385021D5D4F78009168CF /* PrivateOutletRule.swift */,
B2902A0B1D66815600BFCCF7 /* PrivateUnitTestRule.swift */,
D44037962132730000FDA77B /* ProhibitedInterfaceBuilderRule.swift */,
D40F8B6623E6D60E00A5218E /* PhohibitedNaNComparisonRule.swift */,
009E09271DFEE4C200B588A7 /* ProhibitedSuperRule.swift */,
623E36EF1F3DB1B1002E5B71 /* QuickDiscouragedCallRule.swift */,
623E36F11F3DB988002E5B71 /* QuickDiscouragedCallRuleExamples.swift */,
Expand Down Expand Up @@ -2158,7 +2155,6 @@
E8EA41171C2D1DBE004F9930 /* CheckstyleReporter.swift in Sources */,
006ECFC41C44E99E00EF6364 /* LegacyConstantRule.swift in Sources */,
82FE254120F604CB00295958 /* VerticalWhitespaceClosingBracesRule.swift in Sources */,
D40F8B6723E6D60E00A5218E /* PhohibitedNaNComparisonRule.swift in Sources */,
429644B61FB0A9B400D75128 /* SortedFirstLastRule.swift in Sources */,
C3EF547821B5A4000009262F /* LegacyHashingRule.swift in Sources */,
31F1B6CC1F60BF4500A57456 /* SwitchCaseAlignmentRule.swift in Sources */,
Expand Down
7 changes: 0 additions & 7 deletions Tests/LinuxMain.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1064,12 +1064,6 @@ extension PatternMatchingKeywordsRuleTests {
]
}

extension PhohibitedNaNComparisonRuleTests {
static var allTests: [(String, (PhohibitedNaNComparisonRuleTests) -> () throws -> Void)] = [
("testWithDefaultConfiguration", testWithDefaultConfiguration)
]
}

extension PreferSelfTypeOverTypeOfSelfRuleTests {
static var allTests: [(String, (PreferSelfTypeOverTypeOfSelfRuleTests) -> () throws -> Void)] = [
("testWithDefaultConfiguration", testWithDefaultConfiguration)
Expand Down Expand Up @@ -1808,7 +1802,6 @@ XCTMain([
testCase(OverriddenSuperCallRuleTests.allTests),
testCase(OverrideInExtensionRuleTests.allTests),
testCase(PatternMatchingKeywordsRuleTests.allTests),
testCase(PhohibitedNaNComparisonRuleTests.allTests),
testCase(PreferSelfTypeOverTypeOfSelfRuleTests.allTests),
testCase(PrefixedTopLevelConstantRuleTests.allTests),
testCase(PrivateActionRuleTests.allTests),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,12 +510,6 @@ class PatternMatchingKeywordsRuleTests: XCTestCase {
}
}

class PhohibitedNaNComparisonRuleTests: XCTestCase {
func testWithDefaultConfiguration() {
verifyRule(PhohibitedNaNComparisonRule.description)
}
}

class PreferSelfTypeOverTypeOfSelfRuleTests: XCTestCase {
func testWithDefaultConfiguration() {
verifyRule(PreferSelfTypeOverTypeOfSelfRule.description)
Expand Down

0 comments on commit 743853c

Please sign in to comment.