You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feature Request: Enable .swiftlint.yml to include a remote rules configuration #2729
It would be really useful in our organization to allow a .swiftlint.yml to be remotely included from another .swiftlint.yml config. We maintain several iOS / Swift projects, and keeping coding standards synchronized across all of them is difficult. This feature would enable us to create a company-wide config and have each project import that configuration, and we could easily update the config and apply new rules to the portfolio of projects we maintain.
What do you do when there's poor to no network connectivity?
I think the job should surface an error / warning. This could be mitigated by caching the config on repeated invocations.
Should SwiftLint make network calls for every command invocation? If not, how should these remote configs be cached?
I think it should attempt to get a fresh config every time, maybe there are config values to error/warn if a config is unavailable. The configs could be cached in the project root or somewhere like that.
Would these external configs be versioned, if so how?
Thats a good question. I assume we could hash a config and use that to figure out if they have updated.
Would it be possible to import more than one parent configuration?
I think that would make this more complicated than it needs to be.
Would this feature apply equally to local configurations as well as remote ones?
There would have to be some sort of conflict resolution strategy for favoring the remote config or the local config... Favoring one or the other could be useful in different circumstances.
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!
Activity
guzhenhuaGitHub commentedon Apr 28, 2019
So we can use one .swiftlint.yml in several projects. expecting...
jpsim commentedon Apr 29, 2019
I like this, but a few details would need to be figured out:
72A12F4E commentedon Apr 30, 2019
What do you do when there's poor to no network connectivity?
Should SwiftLint make network calls for every command invocation? If not, how should these remote configs be cached?
Would these external configs be versioned, if so how?
Would it be possible to import more than one parent configuration?
Would this feature apply equally to local configurations as well as remote ones?
jpsim commentedon May 13, 2019
Your suggestions sound reasonable. Do you need any help to get started on this @72A12F4E?
bielikb commentedon Jun 29, 2019
@72A12F4E I would like to follow up on these efforts, would you like to collab with me?
Have you already kicked-off some work in these regards?
stale commentedon Nov 8, 2020
This issue has been automatically marked as stale because it has not had any recent activity. Please comment to prevent this issue from being closed. Thank you for your contributions!
fredpi commentedon Nov 8, 2020
There's still an active PR addressing this: #3058
fredpi commentedon Nov 22, 2020
This is now implemented in #3058 and will be available in the next release!