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

A problem when using format file for ruff in Windows and Linux #441

Open
Tracked by #480
DK05310214 opened this issue Apr 9, 2024 · 3 comments
Open
Tracked by #480

A problem when using format file for ruff in Windows and Linux #441

DK05310214 opened this issue Apr 9, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@DK05310214
Copy link

I'm using Ruff for code formatting across different systems and have hit a snag with specifying a format file path in my settings. This setup causes an error when switching systems because the file path is not recognized on the new platform.

Is there a way to make Ruff dynamically adjust the file path based on the operating system it's running on? This would greatly enhance its usability in multi-OS environments.

image

@MichaReiser
Copy link
Member

@DK05310214 no, Ruff has no such functionality. I understand that you want to configure different paths on different systems (/platforms?) because the file is stored at a different location.

CC: @snowsignal I think this is interesting when thinking about the new settings

@DK05310214
Copy link
Author

@DK05310214 no, Ruff has no such functionality. I understand that you want to configure different paths on different systems (/platforms?) because the file is stored at a different location.

CC: @snowsignal I think this is interesting when thinking about the new settings

Thanks for reply.
I think this feature may be very useful.
The paths to configuration file can be set as a list. We can iterate through this list to search for configuration file and pass the file that found for the first time to ruff.

@MichaReiser
Copy link
Member

Would it work if you place the file in your home directory and pass a relative path --config ~/path/to/ruff.toml ?

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

No branches or pull requests

3 participants