-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ci/add swift lint and swiftformat (#53)
* Add swiftlint * reorder Package.swift * Disable the local swiftlint, add swiftformat, avoid removing the internal keyword from the Trait, format all the files in the SDK * Restore internal init on FlagsmithError * Run the linter with --fix to catch a few of the obvious issues * All of the linter errors covered, before running through swiftformat again * More changes, can now run swiftlint and swiftformat together and they're both happy * Tidy up the Package.swift and add some docs for contributors --------- Co-authored-by: Matthew Elwell <[email protected]>
- Loading branch information
1 parent
e78bd04
commit 16bbfb0
Showing
29 changed files
with
1,283 additions
and
1,130 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 |
---|---|---|
|
@@ -27,3 +27,18 @@ jobs: | |
run: swift build -v | ||
- name: Run tests | ||
run: swift test -v | ||
|
||
swift-lint: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Run SwiftLint | ||
uses: norio-nomura/[email protected] | ||
# TODO: enable these settings: | ||
# env: | ||
# DIFF_BASE: ${{ github.base_ref }} | ||
# with: | ||
# args: --strict |
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 @@ | ||
--disable redundantInternal |
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,17 @@ | ||
excluded: # paths to ignore during linting. Takes precedence over `included`. | ||
- Carthage | ||
- .build | ||
|
||
disabled_rules: # rule identifiers to exclude from running | ||
- nesting | ||
- trailing_whitespace | ||
- opening_brace | ||
- trailing_comma | ||
|
||
line_length: | ||
warning: 140 | ||
error: 160 | ||
ignores_comments: true | ||
ignores_urls: true | ||
|
||
|
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
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
Oops, something went wrong.