Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Find config from CWD when formatting from stdin #684

Closed
judemille opened this issue Jan 25, 2024 · 2 comments
Closed

Find config from CWD when formatting from stdin #684

judemille opened this issue Jan 25, 2024 · 2 comments

Comments

@judemille
Copy link
Contributor

It would appear that multiple tools prefer to feed swift-format via stdin.

Currently, swift-format seems to use the default configuration unless a file is specified on the CLI, when formatting a file from stdin. It would be preferable if the utility would find the configuration with the normal logic, but based on the CWD, when reading a file from stdin.

From a cursory look, this shouldn't be too hard to implement. I'll see if I can do it.

@allevato
Copy link
Member

I think that's a sensible feature to have. Happy to review if you send a PR!

@judemille
Copy link
Contributor Author

Finished via #685.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants