From a4e53b563defb3e072aebdea1e229a354d0abcf8 Mon Sep 17 00:00:00 2001 From: Felix Mau Date: Sat, 31 Aug 2019 10:14:20 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20::=20fix=20false=20positive=20of?= =?UTF-8?q?=20swiftlint=20rule=20`unnecessary=5Ftype`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Example/.swiftlint.yml | 2 +- .../Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/Example/.swiftlint.yml b/Example/.swiftlint.yml index 6c53aef..ed2f860 100644 --- a/Example/.swiftlint.yml +++ b/Example/.swiftlint.yml @@ -61,6 +61,6 @@ custom_rules: severity: warning unnecessary_type: name: "Unnecessary Type" - regex: '[ a-zA-Z0-9]*(?:let|var) [ a-zA-Z0-9]*: ([a-zA-Z0-9]*)[\? ]*= \1' + regex: '[ a-zA-Z0-9]*(?:let|var) [ a-zA-Z0-9]*: ([a-zA-Z0-9]*) *= \1' message: "Type Definition Not Needed." severity: warning diff --git a/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift b/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift index 6d4ee58..b1188e0 100644 --- a/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift +++ b/Example/Tests/ViewModel/GradientLoadingBarViewModelTestCase.swift @@ -71,7 +71,6 @@ class GradientLoadingBarViewModelTestCase: XCTestCase { let keyWindow = UIWindow() sharedApplicationMock.keyWindow = keyWindow - // swiftlint:disable:next unnecessary_type var viewModel: GradientLoadingBarViewModel? = GradientLoadingBarViewModel(sharedApplication: sharedApplicationMock, notificationCenter: notificationCenter)