Skip to content

Commit 78e78a4

Browse files
committed
Fix swiftlint warnings.
1 parent c3cad8c commit 78e78a4

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

Boyer-Moore/Tests/BoyerMooreTests.swift

+10-10
Original file line numberDiff line numberDiff line change
@@ -30,48 +30,48 @@ class BoyerMooreTest: XCTestCase {
3030
let match = string.substring(with: startIndex..<endIndex)
3131
XCTAssertEqual(match, pattern)
3232
}
33-
33+
3434
func testSearchTheSameString() {
3535
let string = "ABCDEF"
3636
let pattern = "ABCDEF"
3737
assert(pattern: pattern, existsIn: string)
3838
}
39-
39+
4040
func testSearchAPreffix() {
4141
let string = "ABCDEFGHIJK"
4242
let pattern = "ABCDEF"
4343
assert(pattern: pattern, existsIn: string)
4444
}
45-
45+
4646
func testSearchASuffix() {
4747
let string = "ABCDEFGHIJK"
4848
let pattern = "HIJK"
4949
assert(pattern: pattern, existsIn: string)
5050
}
51-
51+
5252
func testSearchAStringFromTheMiddle() {
5353
let string = "ABCDEFGHIJK"
5454
let pattern = "EFG"
5555
assert(pattern: pattern, existsIn: string)
5656
}
57-
58-
57+
5958
func testSearchInvalidPattern() {
6059
let string = "ABCDEFGHIJK"
6160
let pattern = "AEF"
6261
assert(pattern: pattern, doesNotExistsIn: string)
6362
}
64-
63+
6564
func testSearchPatternWithDuplicatedCharacter() {
66-
let string = "Goal: Write a string search algorithm in pure Swift without importing Foundation or using NSString's rangeOfString() method."
65+
let string = "Goal: Write a string search algorithm in pure Swift "
66+
+ "without importing Foundation or using NSString's rangeOfString() method."
6767
let pattern = "NSS"
6868
assert(pattern: pattern, existsIn: string)
6969
}
7070

7171
func testSearchInvalidPatternWithDuplicatedCharacter() {
72-
let string = "Goal: Write a string search algorithm in pure Swift without importing Foundation or using NSString's rangeOfString() method."
72+
let string = "Goal: Write a string search algorithm in pure Swift "
73+
+ "without importing Foundation or using NSString's rangeOfString() method."
7374
let pattern = "nss"
7475
assert(pattern: pattern, doesNotExistsIn: string)
7576
}
76-
7777
}

Boyer-Moore/Tests/Tests.xcodeproj/project.pbxproj

+17
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
isa = PBXNativeTarget;
6767
buildConfigurationList = 7B2BBC8C1C779D720067B71D /* Build configuration list for PBXNativeTarget "Tests" */;
6868
buildPhases = (
69+
9AED56811E0EEA5B00958DCC /* ShellScript */,
6970
7B2BBC7C1C779D720067B71D /* Sources */,
7071
7B2BBC7D1C779D720067B71D /* Frameworks */,
7172
7B2BBC7E1C779D720067B71D /* Resources */,
@@ -123,6 +124,22 @@
123124
};
124125
/* End PBXResourcesBuildPhase section */
125126

127+
/* Begin PBXShellScriptBuildPhase section */
128+
9AED56811E0EEA5B00958DCC /* ShellScript */ = {
129+
isa = PBXShellScriptBuildPhase;
130+
buildActionMask = 2147483647;
131+
files = (
132+
);
133+
inputPaths = (
134+
);
135+
outputPaths = (
136+
);
137+
runOnlyForDeploymentPostprocessing = 0;
138+
shellPath = /bin/sh;
139+
shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi";
140+
};
141+
/* End PBXShellScriptBuildPhase section */
142+
126143
/* Begin PBXSourcesBuildPhase section */
127144
7B2BBC7C1C779D720067B71D /* Sources */ = {
128145
isa = PBXSourcesBuildPhase;

0 commit comments

Comments
 (0)