Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SwiftLint recommends a double run when fixing #784

Merged
merged 11 commits into from
Feb 27, 2023
6 changes: 4 additions & 2 deletions .github/workflows/macOS-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,10 @@ jobs:
codespell # See .codespellrc for args
- name: SwiftLint
run: |
# Adding --fix flag makes CI print only errors that cannot be fixed automatically
swiftlint --fix
# 1. Make all automated fixes that are possible
# 2. git diff to see what (if any) automated fixes were made
# 3. See https://github.com/realm/SwiftLint#xcode explains why the double run
swiftlint --fix --quiet && git diff && swiftlint --quiet
yaroslavyaroslav marked this conversation as resolved.
Show resolved Hide resolved
- name: Resolve dependencies
run: swift package resolve
- name: Build
Expand Down
4 changes: 0 additions & 4 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ opt_in_rules:
- unneeded_parentheses_in_closure_argument
- weak_delegate

# force warnings
force_cast: error
force_try: error

custom_rules:
commented_out_code:
included: .*\.swift # regex that defines paths to include during linting. optional.
Expand Down