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

[feature request] Also watch config files, like pyproject.toml in --watch mode. #4126

Closed
bgianfo opened this issue Apr 26, 2023 · 3 comments
Closed
Labels
cli Related to the command-line interface

Comments

@bgianfo
Copy link

bgianfo commented Apr 26, 2023

It would be very nice if the watch mode would also watch for changes to configuration files.

Such a feature would make iterating on enabling new rulesets a lot easier.

@charliermarsh charliermarsh added the cli Related to the command-line interface label Apr 27, 2023
@mikeleppane
Copy link
Contributor

mikeleppane commented Apr 30, 2023

Hi! Would it be okay if I take a look on this (good first issue).
Proposal: detect changes in pyproject.toml and ruff.toml config files.

@charliermarsh
Copy link
Member

charliermarsh commented May 1, 2023

@mikeleppane - Definitely! I haven't thought too hard about what's required, but feel free to ask questions here as they come up. My guess is that, in the match rx.recv() loop in crates/ruff_cli/src/lib.rs, we can check if the file ends in .toml, then re-run the code to generate the pyproject_strategy and other variables that make it into the commands::run::run call.

@charliermarsh
Copy link
Member

Oh, we added this! From @mikeleppane in #4169.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command-line interface
Projects
None yet
Development

No branches or pull requests

3 participants