Open alanhdu opened 1 month ago
Hi, thanks for the feature request! My instinct is that we should probably fold this into the broader discussion in https://github.com/astral-sh/ruff/issues/283, which discusses design principles for plugins/user-specific lints.
I do like the idea and I see generic rules as a first step towards a customizable Ruff that doesn't require plugin support.
This request is similar to https://github.com/astral-sh/ruff/issues/10131. Would Ruff's banned-api work for your use case?
This is probably a big feature request (and apologies if it has already been asked about), but I am wondering whether there are plans for ruff to allow user-defined / config-defied lint rules?
In particular, I have some internal codebase functions that are deprecated and would like people to move off of. I can certainly try to write a custom CI rule for this, but it'd be super nice if I could somehow configure
ruff
to detect this (since it's already integrated into our CI).I admit I haven't fully thought through what this would look like in practice. I'd love a world where I can specify in my toml file something like:
Is something like this feasible?
(There's a more general question about a plugin interface -- our codebase is big enough that having custom lint rules is useful, but it's not OSS so upstreaming changes to ruff probably isn't worthwhile and forking ruff to add our own rules seems undesirable).