Skip to content
New issue

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

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

Already on GitHub? # to your account

.swiftlint.yml in home dir #606

Closed
mvoelkl opened this issue Apr 5, 2016 · 8 comments
Closed

.swiftlint.yml in home dir #606

mvoelkl opened this issue Apr 5, 2016 · 8 comments
Labels
enhancement Ideas for improvements of existing features and rules. wontfix Issues that became stale and were auto-closed by a bot.

Comments

@mvoelkl
Copy link

mvoelkl commented Apr 5, 2016

I would like to place a global (and central managed) configuration for all of our projects in ~/.swiftlint.yml, but that doesn't seem to work.

Bug (therefore a feature request) or feature?

@jpsim jpsim added the enhancement Ideas for improvements of existing features and rules. label Apr 5, 2016
@jpsim
Copy link
Collaborator

jpsim commented Apr 5, 2016

That's not currently supported, so this is a new feature request.

@joedynamite
Copy link

Not sure if this should be a separate feature request or an extension of this existing one, but remote configuration files (not just home dir) would be nice as well.

The Ruby linter RuboCop allows this with explicit inheritance http://rubocop.readthedocs.io/en/latest/configuration/#inheriting-configuration-from-a-remote-url

@mgrebenets
Copy link
Contributor

Correct me if I'm wrong, but that currently works. Configs are nested.
https://github.com/realm/SwiftLint#nested-configurations

@jpsim
Copy link
Collaborator

jpsim commented Jul 27, 2016

Only configs nested within your project are nested.

@jpsim
Copy link
Collaborator

jpsim commented Jul 27, 2016

or more precisely, configs in or nested in the working directory are applied

@ianpartridge
Copy link

We would really like to be able to run swiftlint --config /path/to/.swiftlint.yml.

This is because we have lots of repos, and use a common git submodule to include files that we need in all of them.

So, we'd do:

git submodule init
git submodule update
swiftlint --config mysubmodule/.swiftlint.yml

@jpsim
Copy link
Collaborator

jpsim commented Aug 21, 2016

@ianpartridge you can do that, but you do have to specify the lint command when passing arguments:

swiftlint lint --config mysubmodule/.swiftlint.yml

@stale
Copy link

stale bot commented 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!

@stale stale bot added the wontfix Issues that became stale and were auto-closed by a bot. label Nov 8, 2020
@stale stale bot closed this as completed Nov 15, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement Ideas for improvements of existing features and rules. wontfix Issues that became stale and were auto-closed by a bot.
Projects
None yet
Development

No branches or pull requests

5 participants