Skip to content

Commit

Permalink
correct swiftlint error
Browse files Browse the repository at this point in the history
  • Loading branch information
Nick Lee authored and Nick Lee committed Aug 4, 2017
1 parent ab91a66 commit 1bdf2b5
Show file tree
Hide file tree
Showing 72 changed files with 1,599 additions and 275 deletions.
92 changes: 92 additions & 0 deletions Journal.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@
B8D9ECFD1F3405ED00B9FEED /* JournalTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8D9ECFC1F3405ED00B9FEED /* JournalTableViewCell.swift */; };
B8D9ECFF1F3407D300B9FEED /* Journal.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8D9ECFE1F3407D300B9FEED /* Journal.swift */; };
B8D9ED011F34124F00B9FEED /* JournalViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8D9ED001F34124F00B9FEED /* JournalViewController.swift */; };
BFD65BB9C8FEF8BC2EDE2044 /* Pods_Journal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76A967BF0DD31349CD1702FF /* Pods_Journal.framework */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
76A967BF0DD31349CD1702FF /* Pods_Journal.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Journal.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A1CC8176CF1D0CA8BB23107C /* Pods-Journal.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Journal.release.xcconfig"; path = "Pods/Target Support Files/Pods-Journal/Pods-Journal.release.xcconfig"; sourceTree = "<group>"; };
B80B61E31F3420F4004A0E1F /* CoreDataProvider.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CoreDataProvider.swift; sourceTree = "<group>"; };
B80B61E71F343507004A0E1F /* JournalModel.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = JournalModel.xcdatamodel; sourceTree = "<group>"; };
B80B61E91F3436EF004A0E1F /* AppDelegateExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegateExtensions.swift; sourceTree = "<group>"; };
Expand All @@ -36,24 +39,36 @@
B8D9ECFC1F3405ED00B9FEED /* JournalTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JournalTableViewCell.swift; sourceTree = "<group>"; };
B8D9ECFE1F3407D300B9FEED /* Journal.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Journal.swift; sourceTree = "<group>"; };
B8D9ED001F34124F00B9FEED /* JournalViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JournalViewController.swift; sourceTree = "<group>"; };
B93798F237D43B0C95C92693 /* Pods-Journal.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Journal.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Journal/Pods-Journal.debug.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
B8D9ECE41F34005F00B9FEED /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
BFD65BB9C8FEF8BC2EDE2044 /* Pods_Journal.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
81AAA02B5BB21E147295E4BA /* Frameworks */ = {
isa = PBXGroup;
children = (
76A967BF0DD31349CD1702FF /* Pods_Journal.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
B8D9ECDE1F34005F00B9FEED = {
isa = PBXGroup;
children = (
B8D9ECE91F34006000B9FEED /* Journal */,
B8D9ECE81F34005F00B9FEED /* Products */,
DA47214D2DE946D7E2EABF22 /* Pods */,
81AAA02B5BB21E147295E4BA /* Frameworks */,
);
sourceTree = "<group>";
};
Expand Down Expand Up @@ -85,16 +100,29 @@
path = Journal;
sourceTree = "<group>";
};
DA47214D2DE946D7E2EABF22 /* Pods */ = {
isa = PBXGroup;
children = (
B93798F237D43B0C95C92693 /* Pods-Journal.debug.xcconfig */,
A1CC8176CF1D0CA8BB23107C /* Pods-Journal.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
B8D9ECE61F34005F00B9FEED /* Journal */ = {
isa = PBXNativeTarget;
buildConfigurationList = B8D9ECF91F34006000B9FEED /* Build configuration list for PBXNativeTarget "Journal" */;
buildPhases = (
FE00AD1F9441325E59EE3BD3 /* [CP] Check Pods Manifest.lock */,
B8D9ECE31F34005F00B9FEED /* Sources */,
B8D9ECE41F34005F00B9FEED /* Frameworks */,
B8D9ECE51F34005F00B9FEED /* Resources */,
733F89E05B8ECA6E58AD30EF /* [CP] Embed Pods Frameworks */,
BEB2CD0547C2FC28A75707B1 /* [CP] Copy Pods Resources */,
B80B61ED1F345A22004A0E1F /* swiftlint */,
);
buildRules = (
);
Expand Down Expand Up @@ -153,6 +181,68 @@
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
733F89E05B8ECA6E58AD30EF /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Journal/Pods-Journal-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
B80B61ED1F345A22004A0E1F /* swiftlint */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = 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";
};
BEB2CD0547C2FC28A75707B1 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Journal/Pods-Journal-resources.sh\"\n";
showEnvVarsInLog = 0;
};
FE00AD1F9441325E59EE3BD3 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../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";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
B8D9ECE31F34005F00B9FEED /* Sources */ = {
isa = PBXSourcesBuildPhase;
Expand Down Expand Up @@ -287,6 +377,7 @@
};
B8D9ECFA1F34006000B9FEED /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B93798F237D43B0C95C92693 /* Pods-Journal.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = EQ43V2KPAV;
Expand All @@ -300,6 +391,7 @@
};
B8D9ECFB1F34006000B9FEED /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A1CC8176CF1D0CA8BB23107C /* Pods-Journal.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
DEVELOPMENT_TEAM = EQ43V2KPAV;
Expand Down
10 changes: 10 additions & 0 deletions Journal.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "0"
version = "2.0">
</Bucket>
13 changes: 3 additions & 10 deletions Journal/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {

return true
}

// MARK: - Core Data stack

lazy var persistentContainer: NSPersistentContainer = {

let container = NSPersistentContainer(name: "JournalModel")
Expand All @@ -33,9 +27,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
})
return container
}()

// MARK: - Core Data Saving support

func saveContext () {
let context = persistentContainer.viewContext
if context.hasChanges {
Expand All @@ -50,4 +44,3 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
}

}

11 changes: 6 additions & 5 deletions Journal/AppDelegateExtensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@

import UIKit

//swiftlint:disable force_cast
extension AppDelegate {

class var shared: AppDelegate {

return UIApplication.shared.delegate as! AppDelegate

}



}
//swiftlint:enable force_cast
Loading

0 comments on commit 1bdf2b5

Please sign in to comment.