Skip to content

Commit 7a73e08

Browse files
committed
config swiftlint
1 parent d9c2fd8 commit 7a73e08

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

Dangerfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,5 @@ end
99
# Warn when there is a big PR
1010
warn('a large PR') if git.lines_of_code > 300
1111

12-
swiftlint.config_file = '.swiftlint.yml'
1312
swiftlint.max_num_violations = 20
1413
swiftlint.lint_files inline_mode: true

sample-ios-swift.xcodeproj/project.pbxproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@
178178
51F567A4204D2D25005A7970 /* Resources */,
179179
D87F9D805E47BBB41A3E585C /* [CP] Embed Pods Frameworks */,
180180
E76616E88AD2B6C54E603912 /* [CP] Copy Pods Resources */,
181+
51455B29204F7840006F08DC /* Run SwiftLint */,
181182
);
182183
buildRules = (
183184
);
@@ -337,6 +338,20 @@
337338
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";
338339
showEnvVarsInLog = 0;
339340
};
341+
51455B29204F7840006F08DC /* Run SwiftLint */ = {
342+
isa = PBXShellScriptBuildPhase;
343+
buildActionMask = 2147483647;
344+
files = (
345+
);
346+
inputPaths = (
347+
);
348+
name = "Run SwiftLint";
349+
outputPaths = (
350+
);
351+
runOnlyForDeploymentPostprocessing = 0;
352+
shellPath = /bin/sh;
353+
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
354+
};
340355
5750694FD5C8C99B41C6D7B4 /* [CP] Embed Pods Frameworks */ = {
341356
isa = PBXShellScriptBuildPhase;
342357
buildActionMask = 2147483647;

sample-ios-swiftTests/sample_ios_swiftTests.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
import XCTest
1010
@testable import sample_ios_swift
1111

12+
// swiftlint:disable type_name
1213
class sample_ios_swiftTests: XCTestCase {
13-
14+
// swiftlint:enable type_name
15+
1416
override func setUp() {
1517
super.setUp()
1618
// Put setup code here. This method is called before the invocation of each test method in the class.

sample-ios-swiftUITests/sample_ios_swiftUITests.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88

99
import XCTest
1010

11+
// swiftlint:disable type_name
1112
class sample_ios_swiftUITests: XCTestCase {
13+
// swiftlint:enable type_name
1214

1315
override func setUp() {
1416
super.setUp()

0 commit comments

Comments
 (0)