Skip to content

Commit 69b52b2

Browse files
Merge pull request #784 from cclauss/patch-1
SwiftLint recommends a double run when fixing
2 parents 985210c + 2df196a commit 69b52b2

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

.github/workflows/macOS-tests.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,10 @@ jobs:
4141
codespell # See .codespellrc for args
4242
- name: SwiftLint
4343
run: |
44-
# Adding --fix flag makes CI print only errors that cannot be fixed automatically
45-
swiftlint --fix
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
4648
- name: Resolve dependencies
4749
run: swift package resolve
4850
- name: Build

.swiftlint.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,6 @@ opt_in_rules:
6060
- unneeded_parentheses_in_closure_argument
6161
- weak_delegate
6262

63-
# force warnings
64-
force_cast: error
65-
force_try: error
66-
6763
custom_rules:
6864
commented_out_code:
6965
included: .*\.swift # regex that defines paths to include during linting. optional.

0 commit comments

Comments
 (0)