Using the --path option ignores included/excluded paths in the config file
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 19.7k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
This change was made about 3 weeks ago: https://github.com/realm/SwiftLint/commit/3568245c1917988829e285067a600584e463d400
It makes files passed with --path ignore the config file. However, we would like to be able to lint single files but make it also respect the configuration file. For example, if it's in the ignored files, linting would just succeed without even checking the file. Likewise if it is not in the included files.
Keeping this behaviour by default seems fine, but if the --config flag is also specified, it could overwrite the default behaviour?
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 by reviewing commit 3568245c1917988829e285067a600584e463d400 and the CLI handling for --path, --config, and included/excluded paths. Verify how a single file is selected and how configuration filters are applied. Done means --path retains its current default behavior while an explicitly supplied --config can make included and excluded paths take effect.
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