-
Notifications
You must be signed in to change notification settings - Fork 459
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
Add Biome Linting Support #2275
Comments
I did that intentionally when I added biome integration, since spotless is a formatter. On a technical level, it shouldn't be a problem to run the linter and apply the autofixes. On a conceptual level, I'm not sure. As I said, spotless is a formatter. I've seen some ideas to integrate linting with spotless, see e.g. #1097 #2149 Personally I wouldn't mind adding an option for applying autofixable linter fixes. That feels in the spirit of formatting. Erroring when a manual fix is needed does not sound right to me though. I wonder what @nedtwigg thinks about applying auto fixable linter fixes in spotless? |
Thanks for the clarification. The diktat integration checks linting as well as formatting, so I was hoping other formatters/linters would too. Our main use case for Spotless is enforcing formatting/linting in CI/CD with one tool. Manually checking Biome in a separate step defeats that purpose a bit. It'd be really great if we could configure the biome integration to check the linting rules as well. I understand that Spotless doesn't support Linting as a standalone concept yet, but maybe reporting linting errors through the formatting channel (as done for detekt, i suspect). Making it opt-in shouldn't hurt anyone. |
I haven't used Diktat yet, so I don't know what it does exactly. Just to be clear, what would you like to happen?
(1. sounds goods to me, 2. isn't really useful if you want to use automated tooling, 3. feels wrong to me but I'm open for other opinions) |
For our release builds we want to enforce, that the formatter and linter has been run on changed code. If we want to stick with spotless only, we'd need option 3. 1 isn't really necessary for our purposes, but would surely be a convenient addition. For reference, the Diktat integration simply fails on linter validations, when running To make it concrete, ideally we'd need the following:
Thanks for considering! |
I would probably split that into 2 options ( Doesn't sound too hard to implement, but since I'm not the maintainer of spotless (I just added the biome formatter), I'd like to wait for @nedtwigg opinion on this. |
Sounds really good to me. Thank you! |
Hi 👋
if I am not mistaken, the Biome-Formatter in Spotless currently only supports formatting but doesn’t check or apply linting rules. It would be great if the integration could support Biome’s linting as well to enforce the same rules as the referenced
biome.json
.I think at the moment Spotless only runs
biome format
. To check the Linting as well we'd need to runbiome check
instead.Thanks for considering this (or telling me that there's a configuration option that i missed 😆 )!
Cheers, Joscha
The text was updated successfully, but these errors were encountered: