Skip to content

Commit

Permalink
chore: clean up build and lint warnings (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeopt authored Mar 19, 2021
1 parent 3b3924c commit 4eabd1a
Show file tree
Hide file tree
Showing 181 changed files with 2,547 additions and 2,691 deletions.
12 changes: 7 additions & 5 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ disabled_rules:
- empty_count
- todo
- implicit_getter
- private_over_fileprivate
- inclusive_language
opt_in_rules:
- empty_string
excluded:
Expand All @@ -21,17 +23,17 @@ function_body_length:
warning: 300
error: 500
function_parameter_count:
warning: 6
error: 8
warning: 10
error: 10
type_body_length:
warning: 300
warning: 500
error: 500
file_length:
warning: 1000
error: 1500
ignore_comment_only_lines: true
cyclomatic_complexity:
warning: 15
warning: 20
error: 25
type_name:
min_length: 1
Expand All @@ -46,4 +48,4 @@ identifier_name:
large_tuple:
warning: 4
error: 5
reporter: "xcode"
reporter: "xcode"
30 changes: 15 additions & 15 deletions DemoObjCApp/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/****************************************************************************
* Copyright 2019, Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
***************************************************************************/
//
// Copyright 2019, 2021, Optimizely, Inc. and contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import <UIKit/UIKit.h>

Expand Down
30 changes: 15 additions & 15 deletions DemoObjCApp/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/****************************************************************************
* Copyright 2019-2021, Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
***************************************************************************/
//
// Copyright 2019-2021, Optimizely, Inc. and contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import "AppDelegate.h"
#import "VariationViewController.h"
Expand Down
31 changes: 16 additions & 15 deletions DemoObjCApp/Customization/CustomLogger.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
/****************************************************************************
* Copyright 2019, Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
***************************************************************************/
//
// Copyright 2019, 2021, Optimizely, Inc. and contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import <Foundation/Foundation.h>
@import Optimizely;

NS_ASSUME_NONNULL_BEGIN

Expand Down
30 changes: 15 additions & 15 deletions DemoObjCApp/Customization/CustomLogger.m
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/****************************************************************************
* Copyright 2019, Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
***************************************************************************/
//
// Copyright 2019, 2021, Optimizely, Inc. and contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import "CustomLogger.h"
@import Optimizely;
Expand Down
27 changes: 22 additions & 5 deletions DemoObjCApp/DemoObjcApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@
remoteGlobalIDString = 6E614DCC21E3F389005982A1;
remoteInfo = "OptimizelySwiftSDK-tvOS";
};
6EAAB6D42602892A00294B8A /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6E4D2FE722C5457F00062EB3 /* OptimizelySwiftSDK.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 75C719BB25E4519B0084187E;
remoteInfo = "OptimizelySwiftSDK-watchOS";
};
6EF41A992523D23E00EAADF1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 6E4D2FE722C5457F00062EB3 /* OptimizelySwiftSDK.xcodeproj */;
Expand Down Expand Up @@ -233,6 +240,7 @@
6E4D2FF722C5457F00062EB3 /* Optimizely.framework */,
6E4D2FF922C5457F00062EB3 /* Optimizely.framework */,
6EF41A9A2523D23E00EAADF1 /* Optimizely.framework */,
6EAAB6D52602892A00294B8A /* Optimizely.framework */,
6E4D2FFB22C5457F00062EB3 /* OptimizelyTests-iOS.xctest */,
6E4D2FFD22C5457F00062EB3 /* OptimizelyTests-Common-iOS.xctest */,
6EF41A9C2523D23E00EAADF1 /* OptimizelyTests-Batch-iOS.xctest */,
Expand Down Expand Up @@ -419,7 +427,7 @@
6EF7496721E40467008B22A0 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1200;
LastUpgradeCheck = 1230;
ORGANIZATIONNAME = Optimizely;
TargetAttributes = {
6EF7498D21E404BB008B22A0 = {
Expand Down Expand Up @@ -545,6 +553,13 @@
remoteRef = 6E4D300C22C5457F00062EB3 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
6EAAB6D52602892A00294B8A /* Optimizely.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Optimizely.framework;
remoteRef = 6EAAB6D42602892A00294B8A /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
6EF41A9A2523D23E00EAADF1 /* Optimizely.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
Expand Down Expand Up @@ -722,6 +737,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -783,6 +799,7 @@
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -817,7 +834,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = ../DemoSwiftApp/DemoSwiftiOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -836,7 +853,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = ../DemoSwiftApp/DemoSwiftiOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -855,7 +872,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = ../DemoSwiftApp/DemoSwifttvOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -875,7 +892,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = "";
CODE_SIGN_STYLE = Automatic;
INFOPLIST_FILE = ../DemoSwiftApp/DemoSwifttvOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1230"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1230"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
30 changes: 14 additions & 16 deletions DemoObjCApp/Samples/SamplesForAPI.h
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
//
/****************************************************************************
* Copyright 2019,2021, Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
***************************************************************************/

// Copyright 2019, 2021, Optimizely, Inc. and contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import <Foundation/Foundation.h>

Expand Down
30 changes: 14 additions & 16 deletions DemoObjCApp/Samples/SamplesForAPI.m
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
//
/****************************************************************************
* Copyright 2019,2021, Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
***************************************************************************/

// Copyright 2019, 2021, Optimizely, Inc. and contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import "SamplesForAPI.h"
@import Optimizely;
Expand Down
30 changes: 15 additions & 15 deletions DemoObjCApp/VariationViewController.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/****************************************************************************
* Copyright 2019, Optimizely, Inc. and contributors *
* *
* Licensed under the Apache License, Version 2.0 (the "License"); *
* you may not use this file except in compliance with the License. *
* You may obtain a copy of the License at *
* *
* http://www.apache.org/licenses/LICENSE-2.0 *
* *
* Unless required by applicable law or agreed to in writing, software *
* distributed under the License is distributed on an "AS IS" BASIS, *
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
* See the License for the specific language governing permissions and *
* limitations under the License. *
***************************************************************************/
//
// Copyright 2019, 2021, Optimizely, Inc. and contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

#import <UIKit/UIKit.h>

Expand Down
Loading

0 comments on commit 4eabd1a

Please sign in to comment.