pre-commit-ci / issues

public issues for https://pre-commit.ci
17 stars 3 forks source link

Executable not found #148

Closed jab closed 1 year ago

jab commented 1 year ago

Just tried pre-commit.ci for the first time and got an unexpected Executable not found error for one of my hooks, namely pyright: https://results.pre-commit.ci/run/github/24373694/1666543909.r2gHWMm5SpejehNcqe-h5g

I cannot reproduce locally nor in GitHub Actions where I am using the pre-commit action. For example, here is a GitHub Actions pre-commit run from a few minutes ago where the pyright hook succeeds: https://github.com/jab/bidict/actions/runs/3307833593/jobs/5459766105#step:6:121

asottile commented 1 year ago

you're using language: system for pylint (which is the unsupported escape hatch for pre-commit and also pre-commit ci). for pyright you've correctly set language: node but you're missing additional_dependencies to actually install pyright

jab commented 1 year ago

Thanks for the quick reply!

Didn't realize language: system was unsupported by pre-commit.ci. Would it make sense to try to make this more obvious to users of the service? E.g. Currently users just see an error message like "Executable pylint not found". An error like "language: system is not supported" would be clearer for users, especially when this doesn't reproduce locally or on GitHub Actions.

Maybe pre-commit.ci should somehow try to warn users about this more prominently ahead of time? (This way users who can't give up hooks like pylint won't waste your resources by trying pre-commit.ci before realizing they can't use it.)

Hope this helps, and thanks again.

asottile commented 1 year ago

it's not specific to pre-commit.ci -- you'll see exactly the same error message locally -- for instance when I check out your repo and run pre-commit I see exactly what pre-commit.ci sees

jab commented 1 year ago

Right, you have to run pre-commit via “tox -e lint” for my project if you want the pylint hook to work. But something like that is true for any project using the pylint hook, and so I guess a “language: system”-specific addition to the “executable not found” error message would help locally too?

On Sat, Oct 29, 2022 at 14:03 Anthony Sottile @.***> wrote:

it's not specific to pre-commit.ci -- you'll see exactly the same error message locally -- for instance when I check out your repo and run pre-commit I see exactly what pre-commit.ci sees

— Reply to this email directly, view it on GitHub https://github.com/pre-commit-ci/issues/issues/148#issuecomment-1295920789, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAP3YE2IVDKT7LKPB3MDILWFVRHDANCNFSM6AAAAAARMNC734 . You are receiving this because you authored the thread.Message ID: @.***>