Feature Request: `swiftlint --fix-errors-only` (or, make `--fix` apply to errors only, and require `--fix --strict` for warnings)
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 19.7k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
Feature Request
- I searched for existing GitHub issues
swiftlint --fix-errors-only
upon entering a new code base into which i would like to inject swiftlint, there are already 700+ warnings that is not yet ready to agree upon. this is not the first time this has happened. we would like to iterate over the warnings, leaving many of them in place to remind us of things that we want to address … but we also want to use the --fix feature to be able to auto-correct those issues we've agreed should be errors.
frankly, i think --fix should apply to errors only, and if one wants to run swiftlint --fix --strict, that would take care of treating warnings as errors. but i understand that this may cause the existing behavior to change for many who rely on warnings when performing auto-correct.
thus, --fix-errors-only would be a way to address this while maintaining backward compatibility with those who may already rely on this.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at SwiftLint's command-line handling for --fix and --strict, then trace how warnings and errors are selected for autocorrection. Define the new flag or revised combination so errors can be fixed without changing existing --fix behavior, and verify that warning handling matches the chosen compatibility approach.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100