Skip to content

Commit b250da6

Browse files
committed
Added SwiftLint and Swift 4.2 support.
1 parent 18ac910 commit b250da6

24 files changed

+957
-698
lines changed

Example/.swiftlint.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
disabled_rules:
2+
- force_cast
3+
- nesting
4+
- line_length
5+
- multiple_closures_with_trailing_closure
6+
- statement_position
7+
- void_return
8+
- identifier_name
9+
- type_name
10+
- function_parameter_count
11+
- trailing_comma
12+
- type_body_length
13+
- function_body_length
14+
- file_length
15+
- generic_type_name
16+
- cyclomatic_complexity
17+
included:
18+
- ../ObjectDecoder
19+
excluded:
20+
- Generated
21+
- Carthage
22+
- Pods
23+
identifier_name:
24+
excluded:
25+
- id
26+
- ok
27+
- vc
28+
trailing_comma:
29+
mandatory_comma: true
30+
type_name:
31+
excluded:
32+
- ID

Example/ObjectDecoder.xcodeproj/project.pbxproj

+12-45
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
607FACCD1AFB9204008FA782 /* Frameworks */,
184184
607FACCE1AFB9204008FA782 /* Resources */,
185185
F4F880C746466622275A6075 /* [CP] Embed Pods Frameworks */,
186-
4BFFCB250BB774DB106C82DE /* [CP] Copy Pods Resources */,
186+
9CCE86F82200BB6200984FCF /* SwiftLint */,
187187
);
188188
buildRules = (
189189
);
@@ -202,8 +202,6 @@
202202
607FACE11AFB9204008FA782 /* Sources */,
203203
607FACE21AFB9204008FA782 /* Frameworks */,
204204
607FACE31AFB9204008FA782 /* Resources */,
205-
8873F59B4202AD3D6E82411B /* [CP] Embed Pods Frameworks */,
206-
5BD2BBF9122A9AFCE77F0FCB /* [CP] Copy Pods Resources */,
207205
);
208206
buildRules = (
209207
);
@@ -228,12 +226,12 @@
228226
607FACCF1AFB9204008FA782 = {
229227
CreatedOnToolsVersion = 6.3.1;
230228
DevelopmentTeam = 5ASXU7W52D;
231-
LastSwiftMigration = 0900;
229+
LastSwiftMigration = 1010;
232230
};
233231
607FACE41AFB9204008FA782 = {
234232
CreatedOnToolsVersion = 6.3.1;
235233
DevelopmentTeam = 5ASXU7W52D;
236-
LastSwiftMigration = 0900;
234+
LastSwiftMigration = 1010;
237235
TestTargetID = 607FACCF1AFB9204008FA782;
238236
};
239237
};
@@ -296,50 +294,23 @@
296294
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/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# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
297295
showEnvVarsInLog = 0;
298296
};
299-
4BFFCB250BB774DB106C82DE /* [CP] Copy Pods Resources */ = {
297+
9CCE86F82200BB6200984FCF /* SwiftLint */ = {
300298
isa = PBXShellScriptBuildPhase;
301299
buildActionMask = 2147483647;
302300
files = (
303301
);
304-
inputPaths = (
305-
);
306-
name = "[CP] Copy Pods Resources";
307-
outputPaths = (
308-
);
309-
runOnlyForDeploymentPostprocessing = 0;
310-
shellPath = /bin/sh;
311-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ObjectDecoder_Example/Pods-ObjectDecoder_Example-resources.sh\"\n";
312-
showEnvVarsInLog = 0;
313-
};
314-
5BD2BBF9122A9AFCE77F0FCB /* [CP] Copy Pods Resources */ = {
315-
isa = PBXShellScriptBuildPhase;
316-
buildActionMask = 2147483647;
317-
files = (
302+
inputFileListPaths = (
318303
);
319304
inputPaths = (
320305
);
321-
name = "[CP] Copy Pods Resources";
322-
outputPaths = (
323-
);
324-
runOnlyForDeploymentPostprocessing = 0;
325-
shellPath = /bin/sh;
326-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ObjectDecoder_Tests/Pods-ObjectDecoder_Tests-resources.sh\"\n";
327-
showEnvVarsInLog = 0;
328-
};
329-
8873F59B4202AD3D6E82411B /* [CP] Embed Pods Frameworks */ = {
330-
isa = PBXShellScriptBuildPhase;
331-
buildActionMask = 2147483647;
332-
files = (
333-
);
334-
inputPaths = (
306+
name = SwiftLint;
307+
outputFileListPaths = (
335308
);
336-
name = "[CP] Embed Pods Frameworks";
337309
outputPaths = (
338310
);
339311
runOnlyForDeploymentPostprocessing = 0;
340312
shellPath = /bin/sh;
341-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ObjectDecoder_Tests/Pods-ObjectDecoder_Tests-frameworks.sh\"\n";
342-
showEnvVarsInLog = 0;
313+
shellScript = "\"${PODS_ROOT}/SwiftLint/swiftlint\"\n";
343314
};
344315
A4344917D462C973528421B3 /* [CP] Check Pods Manifest.lock */ = {
345316
isa = PBXShellScriptBuildPhase;
@@ -543,8 +514,7 @@
543514
MODULE_NAME = ExampleApp;
544515
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
545516
PRODUCT_NAME = "$(TARGET_NAME)";
546-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
547-
SWIFT_VERSION = 4.0;
517+
SWIFT_VERSION = 4.2;
548518
};
549519
name = Debug;
550520
};
@@ -559,8 +529,7 @@
559529
MODULE_NAME = ExampleApp;
560530
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
561531
PRODUCT_NAME = "$(TARGET_NAME)";
562-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
563-
SWIFT_VERSION = 4.0;
532+
SWIFT_VERSION = 4.2;
564533
};
565534
name = Release;
566535
};
@@ -581,8 +550,7 @@
581550
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
582551
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
583552
PRODUCT_NAME = "$(TARGET_NAME)";
584-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
585-
SWIFT_VERSION = 4.0;
553+
SWIFT_VERSION = 4.2;
586554
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ObjectDecoder_Example.app/ObjectDecoder_Example";
587555
};
588556
name = Debug;
@@ -600,8 +568,7 @@
600568
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
601569
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)";
602570
PRODUCT_NAME = "$(TARGET_NAME)";
603-
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
604-
SWIFT_VERSION = 4.0;
571+
SWIFT_VERSION = 4.2;
605572
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ObjectDecoder_Example.app/ObjectDecoder_Example";
606573
};
607574
name = Release;

Example/ObjectDecoder/AppDelegate.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1414
var window: UIWindow?
1515

1616

17-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
17+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
1818
// Override point for customization after application launch.
1919
return true
2020
}

Example/Podfile

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
platform:ios, '8.0'
12
use_frameworks!
23

4+
pod 'SwiftLint'
5+
36
target 'ObjectDecoder_Example' do
47
pod 'ObjectDecoder', :path => '../'
58

Example/Podfile.lock

+12-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
PODS:
2-
- ObjectDecoder (0.1.0)
2+
- ObjectDecoder (0.1.1)
3+
- SwiftLint (0.29.3)
34

45
DEPENDENCIES:
56
- ObjectDecoder (from `../`)
7+
- SwiftLint
8+
9+
SPEC REPOS:
10+
https://github.com/cocoapods/specs.git:
11+
- SwiftLint
612

713
EXTERNAL SOURCES:
814
ObjectDecoder:
9-
:path: ../
15+
:path: "../"
1016

1117
SPEC CHECKSUMS:
12-
ObjectDecoder: 3c8c84efe2c3fb9b46f8cf40fe8335323890ca5c
18+
ObjectDecoder: 08edd19096eefe2de0ef4ea89c44316444907973
19+
SwiftLint: bfa7ca7b4d170cfaf0d236ca3ffd969e88a2f002
1320

14-
PODFILE CHECKSUM: df1b5f18ba2d72ef0da87e15bff4b78129650eac
21+
PODFILE CHECKSUM: 0721bfff6f901e703c99546f2e2709f8408d1244
1522

16-
COCOAPODS: 1.3.1
23+
COCOAPODS: 1.5.3

Example/Pods/Local Podspecs/ObjectDecoder.podspec.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/Pods/Manifest.lock

+12-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)