Skip to content

Commit 2ddcaad

Browse files
Merge branch 'develop'
2 parents cc076ee + 8cb9a20 commit 2ddcaad

File tree

119 files changed

+11200
-11291
lines changed

Some content is hidden

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

119 files changed

+11200
-11291
lines changed

.codespellrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[codespell]
2+
count = True
3+
ignore-words-list = ans,deriver,inout,packag
4+
skip = *.js,*WordLists.swift,.git,Carthage,.build,build

.github/workflows/macOS-tests.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
spm:
3030
name: Swift Package Manager 5.7
3131
runs-on: macOS-12
32-
concurrency:
32+
concurrency:
3333
group: spm-${{ github.run_id }}
3434
cancel-in-progress: false
3535
steps:
@@ -38,7 +38,13 @@ jobs:
3838
run: |
3939
pip3 install --upgrade pip
4040
pip3 install codespell
41-
codespell --count --ignore-words-list=ans,deriver,inout,packag --skip="*.js,*WordLists.swift"
41+
codespell # See .codespellrc for args
42+
- name: SwiftLint
43+
run: |
44+
# 1. Make all automated fixes that are possible
45+
# 2. git diff to see what (if any) automated fixes were made
46+
# 3. See https://github.com/realm/SwiftLint#xcode explains why the double run
47+
swiftlint --fix --quiet && git diff && swiftlint --quiet
4248
- name: Resolve dependencies
4349
run: swift package resolve
4450
- name: Build

.github/workflows/pre-commit.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# https://pre-commit.com
2+
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
3+
# Using pre-commit.ci is even better than using GitHub Actions for pre-commit.
4+
name: pre-commit
5+
on:
6+
pull_request:
7+
branches: [develop]
8+
push:
9+
branches: [develop]
10+
workflow_dispatch:
11+
jobs:
12+
pre-commit:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-python@v4
17+
with:
18+
python-version: 3.x
19+
- run: pip install pre-commit
20+
- run: pre-commit --version
21+
- run: pre-commit install
22+
- run: pre-commit run --all-files

.pre-commit-config.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.2.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
- id: check-case-conflict
10+
- id: check-json
11+
- id: mixed-line-ending
12+
- id: no-commit-to-branch
13+
args: [--branch, staging, --branch, main, --branch, master, --branch, develop-4.0, --branch, develop-upstream]
14+
- repo: https://github.com/codespell-project/codespell
15+
rev: v2.2.2
16+
hooks:
17+
- id: codespell # See .codespellrc for args
18+
# - repo: https://github.com/realm/SwiftLint # Too slow in pre-commit
19+
# rev: 0.50.3
20+
# hooks:
21+
# - id: swiftlint
22+
# args: [--fix, Sources, Tests]

.swiftlint.yml

Lines changed: 55 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,73 @@
11
excluded:
2-
- Carthage
3-
- Pods
42
- .build
53
- Build
4+
- Carthage
65
- DerivedData
6+
- Pods
7+
8+
analyzer_rules:
9+
- unused_import
710

811
disabled_rules:
9-
- type_name
12+
- block_based_kvo
13+
- closure_body_length
14+
- computed_accessors_order
15+
- cyclomatic_complexity
16+
- duplicate_imports
17+
- empty_enum_arguments
18+
- empty_string
19+
- file_length
20+
- for_where
21+
- force_cast
22+
- force_try
23+
- force_unwrapping
24+
- function_body_length
25+
- function_parameter_count
1026
- identifier_name
27+
- implicit_getter
28+
- implicitly_unwrapped_optional
29+
- indentation_width
30+
- large_tuple
31+
- legacy_objc_type
1132
- line_length
1233
- multiple_closures_with_trailing_closure
34+
- nesting
35+
- orphaned_doc_comment
36+
- operator_whitespace
37+
- return_arrow_whitespace
38+
- shorthand_operator
1339
- todo
40+
- trailing_closure
41+
- type_body_length
42+
- type_name
43+
- unneeded_break_in_switch
44+
- unused_optional_binding
45+
- vertical_parameter_alignment
46+
- xctfail_message
1447

1548
opt_in_rules:
16-
- weak_delegate
17-
- unused_import
18-
- unneeded_parentheses_in_closure_argument
19-
- trailing_closure
20-
- static_operator
21-
- redundant_nil_coalescing
22-
- override_in_extension
23-
- legacy_objc_type
24-
- implicitly_unwrapped_optional
25-
- force_unwrapping
26-
- empty_string
27-
- closure_body_length
28-
- fallthrough
29-
- indentation_width
30-
31-
# force warnings
32-
force_cast: error
33-
force_try: error
49+
- closure_body_length
50+
- empty_string
51+
- fallthrough
52+
- force_unwrapping
53+
- implicitly_unwrapped_optional
54+
- indentation_width
55+
- legacy_objc_type
56+
- override_in_extension
57+
- redundant_nil_coalescing
58+
- static_operator
59+
- trailing_closure
60+
- unneeded_parentheses_in_closure_argument
61+
- weak_delegate
3462

3563
custom_rules:
36-
commented_out_code:
37-
included: ".*\\.swift" # regex that defines paths to include during linting. optional.
38-
excluded: ".*Test(s)?\\.swift" # regex that defines paths to exclude during linting. optional
39-
name: "Commented out code" # rule name. optional.
40-
regex: "^\\/\\/\\s*(@|\\.?([a-z]|(\\})))" # matching pattern
64+
commented_out_code:
65+
included: .*\.swift # regex that defines paths to include during linting. optional.
66+
excluded: .*Test(s)?\.swift # regex that defines paths to exclude during linting. optional
67+
name: Commented out code # rule name. optional.
68+
regex: ^\s*(\/\/(?!\s*swiftlint:).*|\/\*[\s\S]*?\*\/) # matching pattern
4169
capture_group: 0 # number of regex capture group to highlight the rule violation at. optional.
4270
match_kinds: # SyntaxKinds to match. optional.
4371
- comment
44-
message: "No commented code in devel branch allowed." # violation message. optional.
72+
message: No commented code in devel branch allowed. # violation message. optional.
4573
severity: warning # violation severity. optional.

CONTRIBUTION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Please take it from the [roadmap](https://hackmd.io/G5znP3xAQY-BVc1X8Y1jSg) or f
1717
1818
## Codestyle guideline
1919
- `swiftlint` check should goes with no warnings.
20-
- Here’s some more detailed and human readable code style [guidelines](https://hackmd.io/8bACoAnTSsKc55Os596yCg "") (you can add there some suggestion if you’d like to).
20+
- Here’s some more detailed and human readable code style [guidelines](https://hackmd.io/8bACoAnTSsKc55Os596yCg "") (you can add there some suggestion if you’d like to).
2121
- We use [swift](https://www.swift.org/documentation/api-design-guidelines/ "") name convention.
2222
## Tests guideline
2323
1. Cover each new public method with tests.
@@ -67,4 +67,4 @@ on:
6767
- [ ] All public method have `///` styled comments.
6868
- [ ] All magic or nonintuitive internal code parts are clearly explained in inline comments.
6969
- [ ] `swiftlint` ran have no warnings.
70-
- [ ] No commented out code lefts in PR.
70+
- [ ] No commented out code lefts in PR.

Example/myWeb3Wallet/Podfile

Lines changed: 0 additions & 30 deletions
This file was deleted.

Example/myWeb3Wallet/Podfile.lock

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)