Environment variable to override default config path
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 19.7k
- Forks
- 2.3k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 11
Description
New Issue Checklist
- I've Updated SwiftLint to the latest version.
- I've searched for existing GitHub issues.
Feature or Enhancement Proposal
It would be useful to be able to specify configuration for swiftlint.yml not only via CLI argument, but also via ENV variables, so that they could be set at the CI/mise/dotenv level, so as not to duplicate default parameters every time (not only --config) and not create your own wrappers around swiftlint via the same mise tasks or makefile.
Imho, It seems to be a fairly common practice.
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 CLI handling for the existing --config option and trace how the default swiftlint.yml path is selected. Define the environment-variable behavior alongside that option, including its precedence, then add coverage for the override and verify the CLI still uses its existing default when the variable is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 64/100