Skip to content

Commit 2624294

Browse files
committed
Merge pull request #3 from polydice/feature/swift-lint
Merge branch 'feature/swift-lint' into develop
2 parents db5191a + da2e4c1 commit 2624294

File tree

8 files changed

+41
-6
lines changed

8 files changed

+41
-6
lines changed

.hound.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
swift:
2+
enabled: true
3+
config_file: .swiftlint.yml

.swiftlint.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
disabled_rules:
2+
- conditional_binding_cascade
3+
- force_cast
4+
- force_try
5+
- line_length
6+
- nesting
7+
type_name:
8+
excluded:
9+
- iCookTVKeys
10+
- iCookTVTests
11+
variable_name:
12+
excluded:
13+
- id
14+
- URL
15+
excluded:
16+
- Carthage
17+
- Pods
18+
- iCookTV/R.generated.swift

Brewfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
tap "caskroom/cask"
22

3+
brew "swiftlint"
34
brew "xcproj"

iCookTV.xcodeproj/project.pbxproj

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@
319319
24D096314DA4D14E4EDFA5EB /* 📦 Check Pods Manifest.lock */,
320320
B5BA3B4A1CF6D19800B0A022 /* Run R.swift Script */,
321321
B5F7BF441BA9C95F00A75099 /* Sources */,
322+
B52DFA9C1CF8006E005B9D67 /* Swiftlint */,
322323
B5F7BF451BA9C95F00A75099 /* Frameworks */,
323324
B5F7BF461BA9C95F00A75099 /* Resources */,
324325
B51A95351CCDFFEB00E5ED97 /* Run Fabric Script */,
@@ -490,6 +491,20 @@
490491
shellPath = /bin/sh;
491492
shellScript = "if [ \"$CI\" != true ]; then\n FABRIC_APIKEY=$(cat ${SRCROOT}/keys/fabric.apikey);\n FABRIC_BUILDSECRET=$(cat ${SRCROOT}/keys/fabric.buildsecret);\n ${PODS_ROOT}/Fabric/run ${FABRIC_APIKEY} ${FABRIC_BUILDSECRET};\nfi";
492493
};
494+
B52DFA9C1CF8006E005B9D67 /* Swiftlint */ = {
495+
isa = PBXShellScriptBuildPhase;
496+
buildActionMask = 2147483647;
497+
files = (
498+
);
499+
inputPaths = (
500+
);
501+
name = Swiftlint;
502+
outputPaths = (
503+
);
504+
runOnlyForDeploymentPostprocessing = 0;
505+
shellPath = /bin/sh;
506+
shellScript = "if which swiftlint >/dev/null; then swiftlint; fi";
507+
};
493508
B5BA3B4A1CF6D19800B0A022 /* Run R.swift Script */ = {
494509
isa = PBXShellScriptBuildPhase;
495510
buildActionMask = 2147483647;

iCookTV/GroundControl.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import Alamofire
3030
struct GroundControl {
3131

3232
enum VideoSource {
33-
case HLS ,YouTube
33+
case HLS, YouTube
3434
}
3535

3636
/// Returns the URL of default background image URL.

iCookTV/Tracker.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ enum Tracker {
6161
}
6262
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
6363
let description = String(error)
64-
Debug.print(description)
64+
Debug.print(description, file: file, function: function, line: line)
6565
Answers.logCustomEventWithName("Error", customAttributes: ["Description": description])
6666
TreasureData.sharedInstance().addEvent([
6767
"description": description,

iCookTV/UIImage+Grid.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import UIKit
2929
extension UIImage {
3030

3131
func image(byReplacingImage image: UIImage, atCorner corner: Grid) -> UIImage! {
32-
UIGraphicsBeginImageContextWithOptions(size, true, 0);
32+
UIGraphicsBeginImageContextWithOptions(size, true, 0)
3333

3434
let canvas = CGRect(origin: CGPoint.zero, size: size)
3535
self.drawInRect(canvas)
@@ -72,5 +72,3 @@ extension UIImage {
7272
}
7373

7474
}
75-
76-

iCookTV/VideosViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ class VideosViewController: BlurBackgroundViewController,
221221

222222
// MARK: - Trackable
223223

224-
var pageView: PageView?{
224+
var pageView: PageView? {
225225
return PageView(name: "Videos", details: [
226226
TrackableKey.categoryID: categoryID,
227227
TrackableKey.categoryTitle: title ?? ""

0 commit comments

Comments
 (0)