Skip to content

Commit

Permalink
Enable SwiftLint for the project (#303)
Browse files Browse the repository at this point in the history
  • Loading branch information
whoiswillma authored Oct 12, 2020
1 parent 1b06bbd commit 47b4e1c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 15 deletions.
1 change: 1 addition & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ disabled_rules:
- function_body_length
- type_body_length
- file_length
- identifier_name

opt_in_rules:
- closure_end_indentation
Expand Down
15 changes: 1 addition & 14 deletions Eatery Watch App Extension/ExtensionDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,7 @@
import WatchKit

class ExtensionDelegate: NSObject, WKExtensionDelegate {

func applicationDidFinishLaunching() {
// Perform any final initialization of your application.
}

func applicationDidBecomeActive() {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}

func applicationWillResignActive() {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, etc.
}


func handle(_ backgroundTasks: Set<WKRefreshBackgroundTask>) {
// Sent when the system needs to launch the application in the background to process tasks. Tasks arrive in a set, so loop through and process each one.
for task in backgroundTasks {
Expand Down
19 changes: 19 additions & 0 deletions Eatery.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -993,6 +993,7 @@
buildPhases = (
E78631FC014922E867F30913 /* [CP] Check Pods Manifest.lock */,
5D854A8521AF85A00067F745 /* [Apollo] Build Apollo */,
5DCE4A012533E6F90025D7BE /* [SwiftLint] */,
C007CABB19E1BEAC00E3BD46 /* Sources */,
C007CABC19E1BEAC00E3BD46 /* Frameworks */,
C007CABD19E1BEAC00E3BD46 /* Resources */,
Expand Down Expand Up @@ -1289,6 +1290,24 @@
shellPath = /bin/sh;
shellScript = "# Slightly modified version of https://blog.curtisherbert.com/automated-build-numbers/\n# This script sets the build number of Info.plist inside of derived data\n# to avoid unnecessary source changes. Note there are multiple copies of \n# this script: one for each target. If you decide to change the script, \n# make sure to change it in all places.\n\nbuild_number=$(git rev-list HEAD | wc -l | tr -d ' ')\n\nplist=\"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\ndsym_plist=\"${DWARF_DSYM_FOLDER_PATH}/${DWARF_DSYM_FILE_NAME}/Contents/Info.plist\"\n\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $build_number\" \"$plist\"\nif [ -f \"$DSYM_INFO_PLIST\" ] ; then\n /usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $build_number\" \"$dsym_plist\"\nfi\n";
};
5DCE4A012533E6F90025D7BE /* [SwiftLint] */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
name = "[SwiftLint]";
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "# Type a script or drag a script file from your workspace to insert its path.\nswiftlint lint\n";
};
9DEA07504979C55F42669623 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
7 changes: 6 additions & 1 deletion Eatery/Views/Giving Day/GivingDayView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ class GivingDayView: UIView {
let style = NSMutableParagraphStyle()
style.lineSpacing = 6
let attributes = [NSAttributedStringKey.paragraphStyle : style]
supportDescriptionTextView.attributedText = NSAttributedString(string: "Support Eatery by donating to Cornell AppDev! Funding will help us add new features like crowdedness, collegetown eateries, and more!", attributes: attributes)
supportDescriptionTextView.attributedText =
NSAttributedString(
string: "Support Eatery by donating to Cornell AppDev! "
+ "Funding will help us add new features like crowdedness, collegetown eateries, and more!",
attributes: attributes
)
supportDescriptionTextView.isSelectable = false
supportDescriptionTextView.isScrollEnabled = false
supportDescriptionTextView.textAlignment = .center
Expand Down

0 comments on commit 47b4e1c

Please sign in to comment.