Skip to content

Commit d931924

Browse files
Merge pull request #310 from skyflowapi/himanshu/SK-2654-implement-spellcheck-ios-sdk
SK-2654: add cspell as spellcheck for iOS sdk
2 parents 6ae4de0 + ae17d6a commit d931924

22 files changed

Lines changed: 287 additions & 82 deletions

.cspell.json

Lines changed: 193 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,193 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"allowCompoundWords": true,
5+
"files": [
6+
"**/*.{swift,md,yml,yaml,json,txt,podspec}"
7+
],
8+
"words": [
9+
"Skyflow",
10+
"skyflow",
11+
"skyflowapi",
12+
"skyflow-iOS",
13+
"skyflow-ios",
14+
"skyflow-android",
15+
"skyflow-node",
16+
"detokenize",
17+
"detokenizing",
18+
"detokenized",
19+
"tokenize",
20+
"tokenized",
21+
"tokenization",
22+
"tokenProvider",
23+
"TokenProvider",
24+
"retokenize",
25+
"de-identify",
26+
"re-identify",
27+
"deidentify",
28+
"reidentify",
29+
"upsert",
30+
"upserting",
31+
"upserted",
32+
"vaultID",
33+
"vaultURL",
34+
"vaultId",
35+
"vaultUrl",
36+
"skyflowID",
37+
"skyflow_id",
38+
"skyflowIds",
39+
"getById",
40+
"getByID",
41+
"invokeConnection",
42+
"bearerToken",
43+
"getBearerToken",
44+
"altText",
45+
"setAltText",
46+
"clearAltText",
47+
"setToken",
48+
"setValue",
49+
"clearValue",
50+
"setError",
51+
"resetError",
52+
"enableCopy",
53+
"enableCardIcon",
54+
"cardMetadata",
55+
"cardMetaData",
56+
"CardMetadata",
57+
"CardType",
58+
"CARDHOLDER",
59+
"MASTERCARD",
60+
"HIPERCARD",
61+
"UNIONPAY",
62+
"MAESTRO",
63+
"AMEX",
64+
"DINERS",
65+
"BYOT",
66+
"redaction",
67+
"RedactionType",
68+
"REDACTED",
69+
"MASKED",
70+
"composable",
71+
"Composable",
72+
"getComposableView",
73+
"composableLayout",
74+
"unmount",
75+
"unmounted",
76+
"programmatically",
77+
"ValidationSet",
78+
"LengthMatchRule",
79+
"RegexMatchRule",
80+
"ElementValueMatchRule",
81+
"SkyflowError",
82+
"SkyflowErrorCode",
83+
"logLevel",
84+
"LogLevel",
85+
"ElementType",
86+
"ContainerType",
87+
"ContainerOptions",
88+
"CollectContainer",
89+
"RevealContainer",
90+
"RevealElement",
91+
"CollectElement",
92+
"CollectOptions",
93+
"CollectElementInput",
94+
"CollectElementOptions",
95+
"RevealElementInput",
96+
"RevealElementOptions",
97+
"ContextOptions",
98+
"CardIconAlignment",
99+
"AEXML",
100+
"xcodeproj",
101+
"xcworkspace",
102+
"xcassets",
103+
"xctestplan",
104+
"cocoapods",
105+
"CocoaPods",
106+
"Podfile",
107+
"podspec",
108+
"addArrangedSubview",
109+
"addSubview",
110+
"UIKit",
111+
"UIView",
112+
"UIColor",
113+
"UIFont",
114+
"UIEdgeInsets",
115+
"UIStackView",
116+
"UILabel",
117+
"NSTextAlignment",
118+
"CALayer",
119+
"CGFloat",
120+
"NSLocalizedDescriptionKey",
121+
"NSUUID",
122+
"URLSession",
123+
"JSONSerialization",
124+
"isFirstResponder",
125+
"resignFirstResponder",
126+
"Luhn",
127+
"checkSum",
128+
"CCPA",
129+
"LangAndVersion",
130+
"GILLSANSCE",
131+
"binlookup",
132+
"getComposableLayout",
133+
"CARTES_BANCAIRES",
134+
"DINERS_CLUB",
135+
"organisation",
136+
"Bharti",
137+
"Sagar",
138+
"Verma",
139+
"Akhil",
140+
"Tejesh",
141+
"Reddy",
142+
"Allampati",
143+
"bstyle",
144+
"MMYY",
145+
"mmyy",
146+
"YYMM",
147+
"yymm",
148+
"customise",
149+
"behaviour",
150+
"xxxxxxer",
151+
"XCUI",
152+
"cgColor",
153+
"UIMenu",
154+
"Astrisk",
155+
"astrisk",
156+
"requiredAstrisk",
157+
"abcfgdyt",
158+
"istyle",
159+
"Bobb",
160+
"ifields"
161+
],
162+
"languageSettings": [
163+
{
164+
"languageId": "swift",
165+
"locale": "*",
166+
"ignoreRegExpList": [
167+
"/\\b[A-Z][A-Z0-9_]{2,}\\b/g",
168+
"/^import\\s+.*/m"
169+
]
170+
}
171+
],
172+
"ignorePaths": [
173+
".git/**",
174+
".github/**",
175+
".build/**",
176+
".swiftpm/**",
177+
"*.lock",
178+
"*.log",
179+
"**/*.xcodeproj/**",
180+
"**/*.xcworkspace/**",
181+
"**/Pods/**",
182+
"build/**",
183+
"**/build/**",
184+
"Rule/**",
185+
"**/*.plist"
186+
],
187+
"ignoreRegExpList": [
188+
"/#[0-9a-fA-F]{3,8}\\b/g",
189+
"/(eyJ[A-Za-z0-9+/=_-]+\\.)+[A-Za-z0-9+/=_-]+/g",
190+
"/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi",
191+
"/[A-Za-z0-9_.~-]*%[0-9A-Fa-f]{2}[A-Za-z0-9_.~%-]*/g"
192+
]
193+
}

.github/workflows/pr.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,17 @@ jobs:
5151
with:
5252
token: ${{ secrets.CODECOV_TOKEN }}
5353

54+
spellcheck:
55+
name: Run spellcheck
56+
runs-on: ubuntu-latest
57+
steps:
58+
- uses: actions/checkout@v4
59+
- uses: streetsidesoftware/cspell-action@v8
60+
with:
61+
config: .cspell.json
62+
strict: true
63+
inline: error
64+
incremental_files_only: false
65+
5466

5567

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ All notable changes to this project will be documented in this file.
130130
- Validation to token obtained from `tokenProvider`
131131

132132
### Fixed
133-
- Request headers not getting overriden due to case sensitivity
133+
- Request headers not getting overridden due to case sensitivity
134134

135135
## [1.12.0] - 2022-02-24
136136

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ skyflowClient.insert(records: records, options: insertOptions, callback: insertC
219219

220220
### Step 1: Create a container
221221

222-
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as show below
222+
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as shown below
223223

224224
```swift
225225
let container = skyflowClient.container(type: Skyflow.ContainerType.COLLECT)
@@ -563,7 +563,7 @@ You can update the data in a vault with Skyflow Elements. Use the following step
563563

564564
### Step 1: Create a container
565565

566-
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as show below
566+
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as shown below
567567

568568
```swift
569569
let container = skyflowClient.container(type: Skyflow.ContainerType.COLLECT)
@@ -811,7 +811,7 @@ let confirmPasswordInput = CollectElementInput(
811811
)
812812
let confirmPassword = container?.create(input: confirmPasswordInput, options: collectElementOptions)
813813

814-
// mount elements on screen - errors will be shown if any of the validaitons fail
814+
// mount elements on screen - errors will be shown if any of the validations fail
815815
stackView.addArrangedSubview(password!)
816816
stackView.addArrangedSubview(confirmPassword!)
817817
```
@@ -931,7 +931,7 @@ cardHolderName.on(eventName: Skyflow.EventName.CHANGE) { state in
931931

932932
Helps to display custom error messages on the Skyflow Elements through the methods `setError` and `resetError` on the elements.
933933

934-
`setError(error: String)` method is used to set the error text for the element, when this method is trigerred, all the current errors present on the element will be overridden with the custom error message passed. This error will be displayed on the element until `resetError()` is trigerred on the same element.
934+
`setError(error: String)` method is used to set the error text for the element, when this method is triggered, all the current errors present on the element will be overridden with the custom error message passed. This error will be displayed on the element until `resetError()` is triggered on the same element.
935935

936936
`resetError()` method is used to clear the custom error message that is set using `setError`.
937937

@@ -1014,7 +1014,7 @@ Composable Elements combine multiple Skyflow Elements in a single row. The follo
10141014

10151015
### Step 1: Create a composable container
10161016

1017-
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as show below
1017+
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as shown below
10181018

10191019
```swift
10201020
let container = skyflowClient.container(type: Skyflow.ContainerType.COMPOSABLE, options: ContainerOptions)
@@ -1590,7 +1590,7 @@ composableContainer?.on(eventName: .SUBMIT){
15901590
Composable Elements combine multiple Skyflow Elements in a single row. The following steps create a composable element and securely update data through it.
15911591

15921592
### Step 1: Create a composable container
1593-
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as show below
1593+
First create a **container** for the form elements using the ```skyflowClient.container(type: Skyflow.ContainerType)``` method as shown below
15941594

15951595
```swift
15961596
var containerOptions = ContainerOptions(
@@ -2148,7 +2148,7 @@ container.reveal(callback: revealCallback)
21482148

21492149
Helps to display custom error messages on the Skyflow Elements through the methods `setError` and `resetError` on the elements.
21502150

2151-
`setError(error: String)` method is used to set the error text for the element, when this method is trigerred, all the current errors present on the element will be overridden with the custom error message passed. This error will be displayed on the element until `resetError()` is trigerred on the same element.
2151+
`setError(error: String)` method is used to set the error text for the element, when this method is triggered, all the current errors present on the element will be overridden with the custom error message passed. This error will be displayed on the element until `resetError()` is triggered on the same element.
21522152

21532153
`resetError()` method is used to clear the custom error message that is set using `setError`.
21542154

@@ -2189,7 +2189,7 @@ let cardNumberInput = Skyflow.RevealElementInput(
21892189
errorTextStyles: errorTextStyles,
21902190
label: "cardnumber",
21912191
altText: "XXXX XXXX XXXX XXXX",
2192-
redaction: SKyflow.RedactionType.MASKED
2192+
redaction: Skyflow.RedactionType.MASKED
21932193
)
21942194

21952195
let cardNumberElement = container?.create(input: cardNumberInput)

Samples/Validations/Validations/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class ViewController: UIViewController {
100100
)
101101
let confirmPassword = container?.create(input: confirmPasswordInput, options: collectElementOptions)
102102
self.confirmPasswordElement = confirmPassword
103-
// mount elements on screen - errors will be shown if any of the validaitons fail
103+
// mount elements on screen - errors will be shown if any of the validations fail
104104
stackView.addArrangedSubview(password!)
105105
stackView.addArrangedSubview(confirmPassword!)
106106
let resetButton = UIButton(frame: CGRect(x: 100, y: 400, width: 100, height: 40))

Sources/Skyflow/core/Log.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2022 Skyflow
33
*/
44

5-
// Implemention of different states of LOGS
5+
// Implementation of different states of LOGS
66

77
import Foundation
88

Sources/Skyflow/elements/PaddingLabel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Copyright (c) 2022 Skyflow
33
*/
44

5-
// Impletementation for TextField other than SkyflowInputField, for ex : [validation error, label, reveal element]
5+
// Implementation for TextField other than SkyflowInputField, for ex : [validation error, label, reveal element]
66

77

88
import Foundation

Sources/Skyflow/elements/TextField.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ public class TextField: SkyflowElement, Element, BaseElement {
565565
if (listCardTypes!.count >= 2){
566566
imageView.frame = CGRect(x: 0, y: 0, width: 40, height: 24)
567567

568-
// uimenu code
568+
// UIMenu code
569569
if #available(iOS 14.0, *) {
570570
if (cardIconAlignment == .left){
571571
textField.padding.left = 70

Sources/Skyflow/elements/TextFieldValidationDelegate.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ internal class TextFieldValidationDelegate: NSObject, UITextFieldDelegate {
105105
return customFormat()
106106
}
107107
if let elementType = collectField.fieldType.instance {
108-
if let acceptabledCharacters = elementType.acceptableCharacters, string.rangeOfCharacter(from: acceptabledCharacters) == nil {
108+
if let acceptableCharacters = elementType.acceptableCharacters, string.rangeOfCharacter(from: acceptableCharacters) == nil {
109109
return false
110110
}
111111

Sources/Skyflow/elements/core/ElementType.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public enum ElementType: Int, CaseIterable {
3737
/// Field type that requires Credit Card Number input formatting and validation.
3838
case CARD_NUMBER
3939

40-
/// Field type that requires Card Expiration Date input formatting and validation, format can be set through CollectElementOptions, defaul is MM/YY
40+
/// Field type that requires Card Expiration Date input formatting and validation, format can be set through CollectElementOptions, default is MM/YY
4141
case EXPIRATION_DATE
4242

4343
/// Field type that requires Card CVV input formatting and validation.
@@ -46,13 +46,13 @@ public enum ElementType: Int, CaseIterable {
4646
/// A generic field type without any validations
4747
case INPUT_FIELD
4848

49-
/// Field type that requires Card PIN input formatting and validatoin
49+
/// Field type that requires Card PIN input formatting and validation
5050
case PIN
5151

5252
/// Field type that requires Card Expiration Month formatting and validation (format: MM)
5353
case EXPIRATION_MONTH
5454

55-
/// Field type that requires Card Expiration Year formatting and validation, format can be set through CollectElementOptions for YY, defaul is YYYY
55+
/// Field type that requires Card Expiration Year formatting and validation, format can be set through CollectElementOptions for YY, default is YYYY
5656
case EXPIRATION_YEAR
5757

5858

0 commit comments

Comments
 (0)