-
Notifications
You must be signed in to change notification settings - Fork 447
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
119 changed files
with
11,200 additions
and
11,291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[codespell] | ||
count = True | ||
ignore-words-list = ans,deriver,inout,packag | ||
skip = *.js,*WordLists.swift,.git,Carthage,.build,build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# https://pre-commit.com | ||
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file. | ||
# Using pre-commit.ci is even better than using GitHub Actions for pre-commit. | ||
name: pre-commit | ||
on: | ||
pull_request: | ||
branches: [develop] | ||
push: | ||
branches: [develop] | ||
workflow_dispatch: | ||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: 3.x | ||
- run: pip install pre-commit | ||
- run: pre-commit --version | ||
- run: pre-commit install | ||
- run: pre-commit run --all-files |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-json | ||
- id: mixed-line-ending | ||
- id: no-commit-to-branch | ||
args: [--branch, staging, --branch, main, --branch, master, --branch, develop-4.0, --branch, develop-upstream] | ||
- repo: https://github.com/codespell-project/codespell | ||
rev: v2.2.2 | ||
hooks: | ||
- id: codespell # See .codespellrc for args | ||
# - repo: https://github.com/realm/SwiftLint # Too slow in pre-commit | ||
# rev: 0.50.3 | ||
# hooks: | ||
# - id: swiftlint | ||
# args: [--fix, Sources, Tests] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,73 @@ | ||
excluded: | ||
- Carthage | ||
- Pods | ||
- .build | ||
- Build | ||
- Carthage | ||
- DerivedData | ||
- Pods | ||
|
||
analyzer_rules: | ||
- unused_import | ||
|
||
disabled_rules: | ||
- type_name | ||
- block_based_kvo | ||
- closure_body_length | ||
- computed_accessors_order | ||
- cyclomatic_complexity | ||
- duplicate_imports | ||
- empty_enum_arguments | ||
- empty_string | ||
- file_length | ||
- for_where | ||
- force_cast | ||
- force_try | ||
- force_unwrapping | ||
- function_body_length | ||
- function_parameter_count | ||
- identifier_name | ||
- implicit_getter | ||
- implicitly_unwrapped_optional | ||
- indentation_width | ||
- large_tuple | ||
- legacy_objc_type | ||
- line_length | ||
- multiple_closures_with_trailing_closure | ||
- nesting | ||
- orphaned_doc_comment | ||
- operator_whitespace | ||
- return_arrow_whitespace | ||
- shorthand_operator | ||
- todo | ||
- trailing_closure | ||
- type_body_length | ||
- type_name | ||
- unneeded_break_in_switch | ||
- unused_optional_binding | ||
- vertical_parameter_alignment | ||
- xctfail_message | ||
|
||
opt_in_rules: | ||
- weak_delegate | ||
- unused_import | ||
- unneeded_parentheses_in_closure_argument | ||
- trailing_closure | ||
- static_operator | ||
- redundant_nil_coalescing | ||
- override_in_extension | ||
- legacy_objc_type | ||
- implicitly_unwrapped_optional | ||
- force_unwrapping | ||
- empty_string | ||
- closure_body_length | ||
- fallthrough | ||
- indentation_width | ||
|
||
# force warnings | ||
force_cast: error | ||
force_try: error | ||
- closure_body_length | ||
- empty_string | ||
- fallthrough | ||
- force_unwrapping | ||
- implicitly_unwrapped_optional | ||
- indentation_width | ||
- legacy_objc_type | ||
- override_in_extension | ||
- redundant_nil_coalescing | ||
- static_operator | ||
- trailing_closure | ||
- unneeded_parentheses_in_closure_argument | ||
- weak_delegate | ||
|
||
custom_rules: | ||
commented_out_code: | ||
included: ".*\\.swift" # regex that defines paths to include during linting. optional. | ||
excluded: ".*Test(s)?\\.swift" # regex that defines paths to exclude during linting. optional | ||
name: "Commented out code" # rule name. optional. | ||
regex: "^\\/\\/\\s*(@|\\.?([a-z]|(\\})))" # matching pattern | ||
commented_out_code: | ||
included: .*\.swift # regex that defines paths to include during linting. optional. | ||
excluded: .*Test(s)?\.swift # regex that defines paths to exclude during linting. optional | ||
name: Commented out code # rule name. optional. | ||
regex: ^\s*(\/\/(?!\s*swiftlint:).*|\/\*[\s\S]*?\*\/) # matching pattern | ||
capture_group: 0 # number of regex capture group to highlight the rule violation at. optional. | ||
match_kinds: # SyntaxKinds to match. optional. | ||
- comment | ||
message: "No commented code in devel branch allowed." # violation message. optional. | ||
message: No commented code in devel branch allowed. # violation message. optional. | ||
severity: warning # violation severity. optional. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.