Skip to content

Commit c744dfc

Browse files
committed
Update swiftlint script and remove trailing characters
1 parent 07cceab commit c744dfc

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ disabled_rules:
22
- file_length
33
- line_length
44
- type_body_length
5+
- vertical_whitespace
56
excluded:
67
- Carthage
78
- Pods

Example.xcodeproj/project.pbxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@
284284
);
285285
runOnlyForDeploymentPostprocessing = 0;
286286
shellPath = /bin/sh;
287-
shellScript = "if which swiftlint >/dev/null; then swiftlint; fi";
287+
shellScript = "sh ${SRCROOT}/scripts/swiftlint.sh";
288288
};
289289
CAB3B20531AAE2438C48D751 /* [CP] Embed Pods Frameworks */ = {
290290
isa = PBXShellScriptBuildPhase;

Example/CustomizedTokenViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class CustomizedTokenViewController: UIViewController, ICTokenFieldDelegate {
3737
override func loadView() {
3838
super.loadView()
3939
view.backgroundColor = UIColor.white
40-
textView.text = "[\n\n]";
40+
textView.text = "[\n\n]"
4141
textView.font = UIFont.preferredFont(forTextStyle: .subheadline)
4242
textView.frame = view.bounds.insetBy(dx: 10, dy: 10)
4343
textView.autoresizingMask = [.flexibleWidth, .flexibleHeight]

Example/StoryboardViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ class StoryboardViewController: UITableViewController {
3333
didSet {
3434
tokenField.normalTokenAttributes = [
3535
NSForegroundColorAttributeName: UIColor.white,
36-
NSBackgroundColorAttributeName: UIColor.white.withAlphaComponent(0.25),
36+
NSBackgroundColorAttributeName: UIColor.white.withAlphaComponent(0.25)
3737
]
3838

3939
tokenField.highlightedTokenAttributes = [
4040
NSForegroundColorAttributeName: UIColor.darkGray,
41-
NSBackgroundColorAttributeName: UIColor.white,
41+
NSBackgroundColorAttributeName: UIColor.white
4242
]
4343
}
4444
}

scripts/swiftlint.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
SWIFTLINT_VERSION="0.13.2"
4+
5+
if ! command -v swiftlint >/dev/null; then
6+
brew install swiftlint
7+
elif [ $(swiftlint version) != "$SWIFTLINT_VERSION" ]; then
8+
brew upgrade swiftlint
9+
fi
10+
11+
swiftlint

0 commit comments

Comments
 (0)