From daff4149f164496f17df17b5ad9135e2bbf9d4a3 Mon Sep 17 00:00:00 2001 From: noboru-i Date: Wed, 7 Mar 2018 10:33:52 +0900 Subject: [PATCH] config swiftlint --- sample-ios-swift.xcodeproj/project.pbxproj | 15 +++++++++++++++ sample-ios-swiftTests/sample_ios_swiftTests.swift | 4 +++- .../sample_ios_swiftUITests.swift | 2 ++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/sample-ios-swift.xcodeproj/project.pbxproj b/sample-ios-swift.xcodeproj/project.pbxproj index 2e9c5a1..bd04f64 100644 --- a/sample-ios-swift.xcodeproj/project.pbxproj +++ b/sample-ios-swift.xcodeproj/project.pbxproj @@ -178,6 +178,7 @@ 51F567A4204D2D25005A7970 /* Resources */, D87F9D805E47BBB41A3E585C /* [CP] Embed Pods Frameworks */, E76616E88AD2B6C54E603912 /* [CP] Copy Pods Resources */, + 51455B29204F7840006F08DC /* Run SwiftLint */, ); buildRules = ( ); @@ -337,6 +338,20 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; + 51455B29204F7840006F08DC /* Run SwiftLint */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run SwiftLint"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi"; + }; 5750694FD5C8C99B41C6D7B4 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; diff --git a/sample-ios-swiftTests/sample_ios_swiftTests.swift b/sample-ios-swiftTests/sample_ios_swiftTests.swift index dd30ce7..f365f8b 100644 --- a/sample-ios-swiftTests/sample_ios_swiftTests.swift +++ b/sample-ios-swiftTests/sample_ios_swiftTests.swift @@ -9,8 +9,10 @@ import XCTest @testable import sample_ios_swift +// swiftlint:disable type_name class sample_ios_swiftTests: XCTestCase { - + // swiftlint:enable type_name + override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. diff --git a/sample-ios-swiftUITests/sample_ios_swiftUITests.swift b/sample-ios-swiftUITests/sample_ios_swiftUITests.swift index 6bcf858..61c26e6 100644 --- a/sample-ios-swiftUITests/sample_ios_swiftUITests.swift +++ b/sample-ios-swiftUITests/sample_ios_swiftUITests.swift @@ -8,7 +8,9 @@ import XCTest +// swiftlint:disable type_name class sample_ios_swiftUITests: XCTestCase { + // swiftlint:enable type_name override func setUp() { super.setUp()