Skip to content

Commit 4eabd1a

Browse files
authored
chore: clean up build and lint warnings (#397)
1 parent 3b3924c commit 4eabd1a

File tree

181 files changed

+2547
-2691
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+2547
-2691
lines changed

.swiftlint.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ disabled_rules:
44
- empty_count
55
- todo
66
- implicit_getter
7+
- private_over_fileprivate
8+
- inclusive_language
79
opt_in_rules:
810
- empty_string
911
excluded:
@@ -21,17 +23,17 @@ function_body_length:
2123
warning: 300
2224
error: 500
2325
function_parameter_count:
24-
warning: 6
25-
error: 8
26+
warning: 10
27+
error: 10
2628
type_body_length:
27-
warning: 300
29+
warning: 500
2830
error: 500
2931
file_length:
3032
warning: 1000
3133
error: 1500
3234
ignore_comment_only_lines: true
3335
cyclomatic_complexity:
34-
warning: 15
36+
warning: 20
3537
error: 25
3638
type_name:
3739
min_length: 1
@@ -46,4 +48,4 @@ identifier_name:
4648
large_tuple:
4749
warning: 4
4850
error: 5
49-
reporter: "xcode"
51+
reporter: "xcode"

DemoObjCApp/AppDelegate.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
/****************************************************************************
2-
* Copyright 2019, Optimizely, Inc. and contributors *
3-
* *
4-
* Licensed under the Apache License, Version 2.0 (the "License"); *
5-
* you may not use this file except in compliance with the License. *
6-
* You may obtain a copy of the License at *
7-
* *
8-
* http://www.apache.org/licenses/LICENSE-2.0 *
9-
* *
10-
* Unless required by applicable law or agreed to in writing, software *
11-
* distributed under the License is distributed on an "AS IS" BASIS, *
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13-
* See the License for the specific language governing permissions and *
14-
* limitations under the License. *
15-
***************************************************************************/
1+
//
2+
// Copyright 2019, 2021, Optimizely, Inc. and contributors
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
1616

1717
#import <UIKit/UIKit.h>
1818

DemoObjCApp/AppDelegate.m

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
/****************************************************************************
2-
* Copyright 2019-2021, Optimizely, Inc. and contributors *
3-
* *
4-
* Licensed under the Apache License, Version 2.0 (the "License"); *
5-
* you may not use this file except in compliance with the License. *
6-
* You may obtain a copy of the License at *
7-
* *
8-
* http://www.apache.org/licenses/LICENSE-2.0 *
9-
* *
10-
* Unless required by applicable law or agreed to in writing, software *
11-
* distributed under the License is distributed on an "AS IS" BASIS, *
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13-
* See the License for the specific language governing permissions and *
14-
* limitations under the License. *
15-
***************************************************************************/
1+
//
2+
// Copyright 2019-2021, Optimizely, Inc. and contributors
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
1616

1717
#import "AppDelegate.h"
1818
#import "VariationViewController.h"

DemoObjCApp/Customization/CustomLogger.h

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
1-
/****************************************************************************
2-
* Copyright 2019, Optimizely, Inc. and contributors *
3-
* *
4-
* Licensed under the Apache License, Version 2.0 (the "License"); *
5-
* you may not use this file except in compliance with the License. *
6-
* You may obtain a copy of the License at *
7-
* *
8-
* http://www.apache.org/licenses/LICENSE-2.0 *
9-
* *
10-
* Unless required by applicable law or agreed to in writing, software *
11-
* distributed under the License is distributed on an "AS IS" BASIS, *
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13-
* See the License for the specific language governing permissions and *
14-
* limitations under the License. *
15-
***************************************************************************/
1+
//
2+
// Copyright 2019, 2021, Optimizely, Inc. and contributors
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
1616

1717
#import <Foundation/Foundation.h>
18+
@import Optimizely;
1819

1920
NS_ASSUME_NONNULL_BEGIN
2021

DemoObjCApp/Customization/CustomLogger.m

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
/****************************************************************************
2-
* Copyright 2019, Optimizely, Inc. and contributors *
3-
* *
4-
* Licensed under the Apache License, Version 2.0 (the "License"); *
5-
* you may not use this file except in compliance with the License. *
6-
* You may obtain a copy of the License at *
7-
* *
8-
* http://www.apache.org/licenses/LICENSE-2.0 *
9-
* *
10-
* Unless required by applicable law or agreed to in writing, software *
11-
* distributed under the License is distributed on an "AS IS" BASIS, *
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13-
* See the License for the specific language governing permissions and *
14-
* limitations under the License. *
15-
***************************************************************************/
1+
//
2+
// Copyright 2019, 2021, Optimizely, Inc. and contributors
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
1616

1717
#import "CustomLogger.h"
1818
@import Optimizely;

DemoObjCApp/DemoObjcApp.xcodeproj/project.pbxproj

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,13 @@
134134
remoteGlobalIDString = 6E614DCC21E3F389005982A1;
135135
remoteInfo = "OptimizelySwiftSDK-tvOS";
136136
};
137+
6EAAB6D42602892A00294B8A /* PBXContainerItemProxy */ = {
138+
isa = PBXContainerItemProxy;
139+
containerPortal = 6E4D2FE722C5457F00062EB3 /* OptimizelySwiftSDK.xcodeproj */;
140+
proxyType = 2;
141+
remoteGlobalIDString = 75C719BB25E4519B0084187E;
142+
remoteInfo = "OptimizelySwiftSDK-watchOS";
143+
};
137144
6EF41A992523D23E00EAADF1 /* PBXContainerItemProxy */ = {
138145
isa = PBXContainerItemProxy;
139146
containerPortal = 6E4D2FE722C5457F00062EB3 /* OptimizelySwiftSDK.xcodeproj */;
@@ -233,6 +240,7 @@
233240
6E4D2FF722C5457F00062EB3 /* Optimizely.framework */,
234241
6E4D2FF922C5457F00062EB3 /* Optimizely.framework */,
235242
6EF41A9A2523D23E00EAADF1 /* Optimizely.framework */,
243+
6EAAB6D52602892A00294B8A /* Optimizely.framework */,
236244
6E4D2FFB22C5457F00062EB3 /* OptimizelyTests-iOS.xctest */,
237245
6E4D2FFD22C5457F00062EB3 /* OptimizelyTests-Common-iOS.xctest */,
238246
6EF41A9C2523D23E00EAADF1 /* OptimizelyTests-Batch-iOS.xctest */,
@@ -419,7 +427,7 @@
419427
6EF7496721E40467008B22A0 /* Project object */ = {
420428
isa = PBXProject;
421429
attributes = {
422-
LastUpgradeCheck = 1200;
430+
LastUpgradeCheck = 1230;
423431
ORGANIZATIONNAME = Optimizely;
424432
TargetAttributes = {
425433
6EF7498D21E404BB008B22A0 = {
@@ -545,6 +553,13 @@
545553
remoteRef = 6E4D300C22C5457F00062EB3 /* PBXContainerItemProxy */;
546554
sourceTree = BUILT_PRODUCTS_DIR;
547555
};
556+
6EAAB6D52602892A00294B8A /* Optimizely.framework */ = {
557+
isa = PBXReferenceProxy;
558+
fileType = wrapper.framework;
559+
path = Optimizely.framework;
560+
remoteRef = 6EAAB6D42602892A00294B8A /* PBXContainerItemProxy */;
561+
sourceTree = BUILT_PRODUCTS_DIR;
562+
};
548563
6EF41A9A2523D23E00EAADF1 /* Optimizely.framework */ = {
549564
isa = PBXReferenceProxy;
550565
fileType = wrapper.framework;
@@ -722,6 +737,7 @@
722737
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
723738
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
724739
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
740+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
725741
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
726742
CLANG_WARN_STRICT_PROTOTYPES = YES;
727743
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -783,6 +799,7 @@
783799
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
784800
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
785801
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
802+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
786803
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
787804
CLANG_WARN_STRICT_PROTOTYPES = YES;
788805
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -817,7 +834,7 @@
817834
buildSettings = {
818835
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
819836
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
820-
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
837+
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
821838
CODE_SIGN_STYLE = Automatic;
822839
INFOPLIST_FILE = ../DemoSwiftApp/DemoSwiftiOS/Info.plist;
823840
LD_RUNPATH_SEARCH_PATHS = (
@@ -836,7 +853,7 @@
836853
buildSettings = {
837854
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
838855
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
839-
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
856+
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
840857
CODE_SIGN_STYLE = Automatic;
841858
INFOPLIST_FILE = ../DemoSwiftApp/DemoSwiftiOS/Info.plist;
842859
LD_RUNPATH_SEARCH_PATHS = (
@@ -855,7 +872,7 @@
855872
buildSettings = {
856873
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
857874
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
858-
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
875+
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
859876
CODE_SIGN_STYLE = Automatic;
860877
INFOPLIST_FILE = ../DemoSwiftApp/DemoSwifttvOS/Info.plist;
861878
LD_RUNPATH_SEARCH_PATHS = (
@@ -875,7 +892,7 @@
875892
buildSettings = {
876893
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
877894
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
878-
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
895+
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
879896
CODE_SIGN_STYLE = Automatic;
880897
INFOPLIST_FILE = ../DemoSwiftApp/DemoSwifttvOS/Info.plist;
881898
LD_RUNPATH_SEARCH_PATHS = (

DemoObjCApp/DemoObjcApp.xcodeproj/xcshareddata/xcschemes/DemoObjciOS.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1200"
3+
LastUpgradeVersion = "1230"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

DemoObjCApp/DemoObjcApp.xcodeproj/xcshareddata/xcschemes/DemoObjctvOS.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "1200"
3+
LastUpgradeVersion = "1230"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

DemoObjCApp/Samples/SamplesForAPI.h

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
//
2-
/****************************************************************************
3-
* Copyright 2019,2021, Optimizely, Inc. and contributors *
4-
* *
5-
* Licensed under the Apache License, Version 2.0 (the "License"); *
6-
* you may not use this file except in compliance with the License. *
7-
* You may obtain a copy of the License at *
8-
* *
9-
* http://www.apache.org/licenses/LICENSE-2.0 *
10-
* *
11-
* Unless required by applicable law or agreed to in writing, software *
12-
* distributed under the License is distributed on an "AS IS" BASIS, *
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14-
* See the License for the specific language governing permissions and *
15-
* limitations under the License. *
16-
***************************************************************************/
17-
2+
// Copyright 2019, 2021, Optimizely, Inc. and contributors
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
1816

1917
#import <Foundation/Foundation.h>
2018

DemoObjCApp/Samples/SamplesForAPI.m

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
//
2-
/****************************************************************************
3-
* Copyright 2019,2021, Optimizely, Inc. and contributors *
4-
* *
5-
* Licensed under the Apache License, Version 2.0 (the "License"); *
6-
* you may not use this file except in compliance with the License. *
7-
* You may obtain a copy of the License at *
8-
* *
9-
* http://www.apache.org/licenses/LICENSE-2.0 *
10-
* *
11-
* Unless required by applicable law or agreed to in writing, software *
12-
* distributed under the License is distributed on an "AS IS" BASIS, *
13-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
14-
* See the License for the specific language governing permissions and *
15-
* limitations under the License. *
16-
***************************************************************************/
17-
2+
// Copyright 2019, 2021, Optimizely, Inc. and contributors
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
1816

1917
#import "SamplesForAPI.h"
2018
@import Optimizely;

DemoObjCApp/VariationViewController.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
/****************************************************************************
2-
* Copyright 2019, Optimizely, Inc. and contributors *
3-
* *
4-
* Licensed under the Apache License, Version 2.0 (the "License"); *
5-
* you may not use this file except in compliance with the License. *
6-
* You may obtain a copy of the License at *
7-
* *
8-
* http://www.apache.org/licenses/LICENSE-2.0 *
9-
* *
10-
* Unless required by applicable law or agreed to in writing, software *
11-
* distributed under the License is distributed on an "AS IS" BASIS, *
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
13-
* See the License for the specific language governing permissions and *
14-
* limitations under the License. *
15-
***************************************************************************/
1+
//
2+
// Copyright 2019, 2021, Optimizely, Inc. and contributors
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
1616

1717
#import <UIKit/UIKit.h>
1818

0 commit comments

Comments
 (0)