Skip to content

Commit 3601950

Browse files
Release: 1.8.0
1 parent 315af28 commit 3601950

84 files changed

Lines changed: 13461 additions & 93 deletions

File tree

Some content is hidden

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

.swiftlint.yml

Lines changed: 28 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
# TODO: 5, 6, 17, 18, 25, 31, 36(static vars)
2-
# 12 (newline above return) ignored
3-
41
included:
52
- Source/
63
- Tests/
74
- Example/
85

96
excluded:
10-
- Pods/
11-
7+
- Carthage
8+
- Pods
9+
- DerivedSources
10+
- DerivedData
1211

1312
disabled_rules:
1413
- leading_whitespace
1514
- nesting
15+
- unused_closure_parameter
16+
- file_header
1617

1718
opt_in_rules:
18-
conditional_returns_on_newline
19-
operator_usage_whitespace
20-
file_header
21-
# single_test_class
22-
# explicit_acl
19+
- conditional_returns_on_newline
20+
- operator_usage_whitespace
21+
- file_header
22+
- fallthrough
23+
- weak_delegate
24+
- discarded_notification_center_observer
2325

2426
# Rule Configuration
2527

26-
# 26 (errors over warnings)
27-
2828
## Enabled (by default)
29-
trailing_newline: error # 29
30-
return_arrow_whitespace: error # 2
31-
opening_brace: error # 3, 4, 9, 10, 11, 14, 37, 38
32-
comma: error # 15
33-
operator_whitespace: error # 39
29+
trailing_newline: error
30+
return_arrow_whitespace: error
31+
opening_brace: error
32+
comma: error
33+
function_name_whitespace: error
3434
block_based_kvo: error
3535
class_delegate_protocol: error
3636
closing_brace: error
@@ -57,35 +57,33 @@ multiple_closures_with_trailing_closure: error
5757
notification_center_detachment: error
5858
protocol_property_accessors_order: error
5959
redundant_discardable_let: error
60-
redundant_optional_initialization: error
60+
implicit_optional_initialization: error
6161
redundant_string_enum_value: error
6262
redundant_void_return: error
6363
shorthand_operator: error
6464
superfluous_disable_command: error
6565
switch_case_alignment: error
6666
syntactic_sugar: error
67-
todo: warn
67+
todo: warning
6868
trailing_semicolon: error
6969
unneeded_break_in_switch: error
70-
unused_closure_parameter: error
7170
unused_enumerated: error
7271
valid_ibinspectable: error
7372
vertical_parameter_alignment: error
7473
void_return: error
7574
weak_delegate: error
7675
xctfail_message: error
77-
custom_rules: error
7876

79-
colon: # 1, 7, 8, 19, 27, 28
77+
colon:
8078
severity: error
8179
flexible_right_spacing: false
8280
apply_to_dictionaries: true
8381

84-
vertical_whitespace: # 16, 22, 23, 24
82+
vertical_whitespace:
8583
severity: error
8684
max_empty_lines: 1
8785

88-
type_name: # 30, 33, 34, 35
86+
type_name:
8987
min_length:
9088
warning: 3
9189
error: 3
@@ -94,9 +92,8 @@ type_name: # 30, 33, 34, 35
9492
error: 40
9593
excluded: ""
9694
allowed_symbols: ""
97-
validates_starts_with_lowercase: true
9895

99-
identifier_name: # 32
96+
identifier_name:
10097
min_length:
10198
warning: 2
10299
error: 2
@@ -105,7 +102,6 @@ identifier_name: # 32
105102
error: 40
106103
excluded: ""
107104
allowed_symbols: ""
108-
validates_starts_with_lowercase: false
109105

110106
generic_type_name:
111107
min_length:
@@ -119,17 +115,16 @@ generic_type_name:
119115
validates_starts_with_lowercase: true
120116

121117
cyclomatic_complexity:
122-
severity: error
123118
ignores_case_statements: true
124119

125120
discouraged_direct_init:
126121
severity: error
127-
discouraged_inits:
122+
types:
128123
- "Bundle"
129124
- "UIDevice"
130125

131-
file_line_length:
132-
severity: error
126+
file_length:
127+
warning: 600
133128
ignore_comment_only_lines: false
134129

135130
function_body_length:
@@ -157,7 +152,7 @@ private_over_fileprivate:
157152

158153
private_unit_test:
159154
severity: warning
160-
regex: "XCTestCase"
155+
test_parent_classes: "XCTestCase"
161156

162157
statement_position:
163158
severity: error
@@ -180,15 +175,9 @@ unused_optional_binding:
180175
severity: error
181176
ignore_optional_try: false
182177

183-
file_length:
184-
warning: 600
185-
186178
## Opt-In
187179
conditional_returns_on_newline: error
188-
operator_usage_whitespace: error # 13, 20, 21
189-
file_header:
190-
severity: error
191-
required_string: ""
180+
operator_usage_whitespace: error
192181

193182
custom_rules:
194183
unnecessary_closure_parenthesis:
@@ -208,9 +197,3 @@ custom_rules:
208197
message: "Do not return on the same line and instead prefer to return on a new line."
209198
regex: "else\\b[^\\n]*\\}"
210199
severity: error
211-
212-
# improper_test_value:
213-
# name: "Improper Test Value"
214-
# message: "You must ALWAYS use 'derp' when coding your test values! ALWAYS."
215-
# regex: "(blargh|blergh)"
216-
# severity: error

ButtonMerchant.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'ButtonMerchant'
3-
s.version = '1.7.2'
3+
s.version = '1.8.0'
44
s.summary = 'An open source client library for Button merchants.'
55
s.description = <<-DESC
66
The Button Merchant library is a light-weight, open-source method

ButtonMerchant.xcodeproj/project.pbxproj

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -857,8 +857,9 @@
857857
607FACC81AFB9204008FA782 /* Project object */ = {
858858
isa = PBXProject;
859859
attributes = {
860+
BuildIndependentTargetsInParallel = YES;
860861
LastSwiftUpdateCheck = 0920;
861-
LastUpgradeCheck = 1500;
862+
LastUpgradeCheck = 2600;
862863
ORGANIZATIONNAME = "Button, Inc.";
863864
TargetAttributes = {
864865
607FACCF1AFB9204008FA782 = {
@@ -1349,6 +1350,7 @@
13491350
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
13501351
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
13511352
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1353+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
13521354
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
13531355
CLANG_WARN_STRICT_PROTOTYPES = YES;
13541356
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1357,6 +1359,7 @@
13571359
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
13581360
COPY_PHASE_STRIP = NO;
13591361
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1362+
DEVELOPMENT_TEAM = 39F27QYP2C;
13601363
ENABLE_STRICT_OBJC_MSGSEND = YES;
13611364
ENABLE_TESTABILITY = YES;
13621365
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -1379,6 +1382,7 @@
13791382
MTL_ENABLE_DEBUG_INFO = YES;
13801383
ONLY_ACTIVE_ARCH = YES;
13811384
SDKROOT = iphoneos;
1385+
STRING_CATALOG_GENERATE_SYMBOLS = YES;
13821386
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
13831387
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
13841388
};
@@ -1407,6 +1411,7 @@
14071411
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
14081412
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
14091413
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1414+
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
14101415
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
14111416
CLANG_WARN_STRICT_PROTOTYPES = YES;
14121417
CLANG_WARN_SUSPICIOUS_MOVE = YES;
@@ -1415,6 +1420,7 @@
14151420
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
14161421
COPY_PHASE_STRIP = NO;
14171422
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
1423+
DEVELOPMENT_TEAM = 39F27QYP2C;
14181424
ENABLE_NS_ASSERTIONS = NO;
14191425
ENABLE_STRICT_OBJC_MSGSEND = YES;
14201426
GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -1429,6 +1435,7 @@
14291435
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
14301436
MTL_ENABLE_DEBUG_INFO = NO;
14311437
SDKROOT = iphoneos;
1438+
STRING_CATALOG_GENERATE_SYMBOLS = YES;
14321439
SWIFT_COMPILATION_MODE = wholemodule;
14331440
SWIFT_OPTIMIZATION_LEVEL = "-O";
14341441
SWIFT_TREAT_WARNINGS_AS_ERRORS = NO;
@@ -1443,7 +1450,6 @@
14431450
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
14441451
CLANG_ENABLE_MODULES = YES;
14451452
CODE_SIGN_IDENTITY = "iPhone Developer";
1446-
DEVELOPMENT_TEAM = 39F27QYP2C;
14471453
INFOPLIST_FILE = "$(SRCROOT)/Examples/Swift/Info.plist";
14481454
LD_RUNPATH_SEARCH_PATHS = (
14491455
"$(inherited)",
@@ -1465,7 +1471,6 @@
14651471
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
14661472
CLANG_ENABLE_MODULES = YES;
14671473
CODE_SIGN_IDENTITY = "iPhone Developer";
1468-
DEVELOPMENT_TEAM = 39F27QYP2C;
14691474
INFOPLIST_FILE = "$(SRCROOT)/Examples/Swift/Info.plist";
14701475
LD_RUNPATH_SEARCH_PATHS = (
14711476
"$(inherited)",
@@ -1492,7 +1497,6 @@
14921497
CODE_SIGN_IDENTITY = "iPhone Developer";
14931498
CODE_SIGN_STYLE = Automatic;
14941499
DEBUG_INFORMATION_FORMAT = dwarf;
1495-
DEVELOPMENT_TEAM = 39F27QYP2C;
14961500
GCC_C_LANGUAGE_STANDARD = gnu11;
14971501
INFOPLIST_FILE = Tests/IntegrationTests/Info.plist;
14981502
LD_RUNPATH_SEARCH_PATHS = (
@@ -1521,7 +1525,6 @@
15211525
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
15221526
CODE_SIGN_IDENTITY = "iPhone Developer";
15231527
CODE_SIGN_STYLE = Automatic;
1524-
DEVELOPMENT_TEAM = 39F27QYP2C;
15251528
GCC_C_LANGUAGE_STANDARD = gnu11;
15261529
INFOPLIST_FILE = Tests/IntegrationTests/Info.plist;
15271530
LD_RUNPATH_SEARCH_PATHS = (
@@ -1551,7 +1554,6 @@
15511554
CODE_SIGN_IDENTITY = "iPhone Developer";
15521555
CODE_SIGN_STYLE = Automatic;
15531556
DEBUG_INFORMATION_FORMAT = dwarf;
1554-
DEVELOPMENT_TEAM = 39F27QYP2C;
15551557
GCC_C_LANGUAGE_STANDARD = gnu11;
15561558
INFOPLIST_FILE = "$(SRCROOT)/Examples/Objective-C/Info.plist";
15571559
LD_RUNPATH_SEARCH_PATHS = (
@@ -1581,7 +1583,6 @@
15811583
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
15821584
CODE_SIGN_IDENTITY = "iPhone Developer";
15831585
CODE_SIGN_STYLE = Automatic;
1584-
DEVELOPMENT_TEAM = 39F27QYP2C;
15851586
GCC_C_LANGUAGE_STANDARD = gnu11;
15861587
INFOPLIST_FILE = "$(SRCROOT)/Examples/Objective-C/Info.plist";
15871588
LD_RUNPATH_SEARCH_PATHS = (
@@ -1604,16 +1605,15 @@
16041605
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
16051606
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
16061607
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
1607-
CODE_SIGN_IDENTITY = "iPhone Developer";
1608-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
1608+
CODE_SIGN_IDENTITY = "";
16091609
CODE_SIGN_STYLE = Automatic;
16101610
CURRENT_PROJECT_VERSION = 1;
16111611
DEBUG_INFORMATION_FORMAT = dwarf;
16121612
DEFINES_MODULE = YES;
1613-
DEVELOPMENT_TEAM = 39F27QYP2C;
16141613
DYLIB_COMPATIBILITY_VERSION = 1;
16151614
DYLIB_CURRENT_VERSION = 1;
16161615
DYLIB_INSTALL_NAME_BASE = "@rpath";
1616+
ENABLE_MODULE_VERIFIER = YES;
16171617
GCC_C_LANGUAGE_STANDARD = gnu11;
16181618
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
16191619
INFOPLIST_FILE = Source/Info.plist;
@@ -1624,6 +1624,7 @@
16241624
"@executable_path/Frameworks",
16251625
"@loader_path/Frameworks",
16261626
);
1627+
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
16271628
PRODUCT_BUNDLE_IDENTIFIER = com.usebutton.merchant;
16281629
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
16291630
SKIP_INSTALL = YES;
@@ -1644,15 +1645,14 @@
16441645
CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
16451646
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
16461647
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
1647-
CODE_SIGN_IDENTITY = "iPhone Developer";
1648-
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
1648+
CODE_SIGN_IDENTITY = "";
16491649
CODE_SIGN_STYLE = Automatic;
16501650
CURRENT_PROJECT_VERSION = 1;
16511651
DEFINES_MODULE = YES;
1652-
DEVELOPMENT_TEAM = 39F27QYP2C;
16531652
DYLIB_COMPATIBILITY_VERSION = 1;
16541653
DYLIB_CURRENT_VERSION = 1;
16551654
DYLIB_INSTALL_NAME_BASE = "@rpath";
1655+
ENABLE_MODULE_VERIFIER = YES;
16561656
GCC_C_LANGUAGE_STANDARD = gnu11;
16571657
GCC_TREAT_WARNINGS_AS_ERRORS = YES;
16581658
INFOPLIST_FILE = Source/Info.plist;
@@ -1663,6 +1663,7 @@
16631663
"@executable_path/Frameworks",
16641664
"@loader_path/Frameworks",
16651665
);
1666+
MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++14";
16661667
PRODUCT_BUNDLE_IDENTIFIER = com.usebutton.merchant;
16671668
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
16681669
SKIP_INSTALL = YES;
@@ -1686,7 +1687,6 @@
16861687
CODE_SIGN_IDENTITY = "iPhone Developer";
16871688
CODE_SIGN_STYLE = Automatic;
16881689
DEBUG_INFORMATION_FORMAT = dwarf;
1689-
DEVELOPMENT_TEAM = 39F27QYP2C;
16901690
GCC_C_LANGUAGE_STANDARD = gnu11;
16911691
INFOPLIST_FILE = Tests/UnitTests/Info.plist;
16921692
LD_RUNPATH_SEARCH_PATHS = (
@@ -1713,7 +1713,6 @@
17131713
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
17141714
CODE_SIGN_IDENTITY = "iPhone Developer";
17151715
CODE_SIGN_STYLE = Automatic;
1716-
DEVELOPMENT_TEAM = 39F27QYP2C;
17171716
GCC_C_LANGUAGE_STANDARD = gnu11;
17181717
INFOPLIST_FILE = Tests/UnitTests/Info.plist;
17191718
LD_RUNPATH_SEARCH_PATHS = (

ButtonMerchant.xcodeproj/xcshareddata/xcschemes/ButtonMerchant (Carthage).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 = "1500"
3+
LastUpgradeVersion = "2600"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

ButtonMerchant.xcworkspace/xcshareddata/xcschemes/ButtonMerchant.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 = "1500"
3+
LastUpgradeVersion = "2600"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

ButtonMerchant.xcworkspace/xcshareddata/xcschemes/Example-ObjC.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 = "1500"
3+
LastUpgradeVersion = "2600"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

ButtonMerchant.xcworkspace/xcshareddata/xcschemes/Example.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 = "1500"
3+
LastUpgradeVersion = "2600"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

ButtonMerchant.xcworkspace/xcshareddata/xcschemes/IntegrationTests.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 = "1500"
3+
LastUpgradeVersion = "2600"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

0 commit comments

Comments
 (0)