From 81272a97056954c40cfde224a93e566db2896e36 Mon Sep 17 00:00:00 2001 From: Andrew-Walz-HS <47363368+Andrew-Walz-HS@users.noreply.github.com> Date: Thu, 16 May 2019 10:00:33 -1000 Subject: [PATCH] Updated to Swift 5 (#36) --- .swiftlint.yml | 71 ------------------------------- TokenUI.xcodeproj/project.pbxproj | 22 ++-------- 2 files changed, 3 insertions(+), 90 deletions(-) delete mode 100644 .swiftlint.yml diff --git a/.swiftlint.yml b/.swiftlint.yml deleted file mode 100644 index 91020f4..0000000 --- a/.swiftlint.yml +++ /dev/null @@ -1,71 +0,0 @@ -disabled_rules: - - file_length - - force_cast - - force_try - - identifier_name - - line_length - - todo - - trailing_comma - - type_body_length - - vertical_whitespace - -opt_in_rules: - - closure_end_indentation # Closure end should have the same indentation as the line that started it. - - closure_spacing # Closure expressions should have a single space inside each brace. - - explicit_init # Explicitly calling .init() should be avoided. - - overridden_super_call # Some Overridden methods should always call super. - -excluded: - - Carthage - - Pods - - .build - - vendor - -# Rule Configuration -closure_spacing: - severity: error -colon: - severity: error -comma: - severity: error -cyclomatic_complexity: - ignores_case_statements: true -explicit_init: - severity: error -leading_whitespace: - severity: error -legacy_cggeometry_functions: - severity: error -legacy_constant: - severity: error -opening_brace: - severity: error -overridden_super_call: - severity: error -redundant_optional_initialization: - severity: error -return_arrow_whitespace: - severity: error -statement_position: - severity: error -trailing_newline: - severity: error -trailing_semicolon: - severity: error -trailing_whitespace: - severity: error -private_over_fileprivate: - severity: warning -type_name: - min_length: 3 - max_length: - warning: 60 - error: 100 - -custom_rules: - extra_header_comments: - name: "File header comments" - regex: '(^\/\/ *$)|(^\/\/ *[A-Za-z]+\.swift$)|(^\/\/ *Created by \w*)' - match_kinds: - - comment - message: "Clean up file header comments." diff --git a/TokenUI.xcodeproj/project.pbxproj b/TokenUI.xcodeproj/project.pbxproj index f98eb18..5b1853b 100644 --- a/TokenUI.xcodeproj/project.pbxproj +++ b/TokenUI.xcodeproj/project.pbxproj @@ -210,7 +210,6 @@ A8C860981DA5B1EF00F4B309 /* Headers */, A8C860991DA5B1EF00F4B309 /* Resources */, A81982F61DB003030086BAB1 /* Set version number */, - A8B7678C1E5B9D0C006A2670 /* Run SwiftLint */, ); buildRules = ( ); @@ -292,7 +291,7 @@ }; buildConfigurationList = A8C860951DA5B1EF00F4B309 /* Build configuration list for PBXProject "TokenUI" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( en, @@ -383,21 +382,6 @@ shellScript = "# Get the version number from the tag in git and the number of commits as the build number\nGIT_VERSION=$(git describe --long --tags | cut -f 1 -d \"-\" | cut -c 2-)\nGIT_BUILD=$(git describe --long --tags | cut -f 2 -d \"-\")\nGIT_HASH=$(git describe --long --tags | cut -f 3 -d \"-\")\necho \"Setting version to $GIT_VERSION, build $GIT_BUILD\"\n\n# Set the version info in plist file\n/usr/libexec/PlistBuddy -c \"Set :CFBundleShortVersionString $GIT_VERSION\" \"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\n/usr/libexec/PlistBuddy -c \"Set :CFBundleVersion $GIT_BUILD\" \"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}\"\n"; showEnvVarsInLog = 0; }; - A8B7678C1E5B9D0C006A2670 /* Run SwiftLint */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "Run SwiftLint"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "# Don't lint when building for Carthage\nif [ ! -z \"$CARTHAGE\" ]; then exit 0; fi\n\nif which swiftlint >/dev/null; then\n swiftlint\nelse\n echo \"warning: SwiftLint not installed, download from https://github.com/realm/SwiftLint\"\nfi"; - showEnvVarsInLog = 0; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -524,7 +508,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_TREAT_WARNINGS_AS_ERRORS = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -582,7 +566,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; SWIFT_SWIFT3_OBJC_INFERENCE = Default; SWIFT_TREAT_WARNINGS_AS_ERRORS = YES; - SWIFT_VERSION = 4.2; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic";