nvimdev / guard-collection

collection the tools config for guard
MIT License
31 stars 9 forks source link

add ruff linter,formatter #21

Closed JMarkin closed 1 year ago

JMarkin commented 1 year ago

Checklist (adding a new tool):

xiaoshihou514 commented 1 year ago

Thanks for the pr! Looks mostly great, if you could kindly fix the tests (the linter one mostly, the ruff fix one seems to be those that works locally and just fails on ci) accordingly I would merge this asap.

JMarkin commented 1 year ago

@xiaoshihou514 I don't understand why formatter ruff_fixed failed. fname in tests works fine? On local machine it works

image

ft("python"):fmt("ruff_fix") GuardFmt works fine too.

xiaoshihou514 commented 1 year ago

Well the truth is I don't know either. You can see this commit and this commit literally have no differences, but one ci run failed and the other succeded. The tools are installed correctly and set up in the same manner, the tool version is the same, the test runs perfectly fine locally, but just fails on ci for no reason. I don't know if it's some quirks with docker or neovim's io event scheduling, sadly I don't have the capabilities to fix this :(

xiaoshihou514 commented 11 months ago

Hmm, now that I looked more into this, I think it's because ruff exits with a non-zero exit code and emits stderr (like some linters do), so guard thought it failed, but in your screen shot there aren't any stderr output (in my case there's sth like Found 1 error (1 fixed, 0 remaining).) I will get back to this after the api pr is finished, it's not really solvable right now.