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

better handle missing dependancies #69

Closed
fantapop opened this issue Sep 25, 2019 · 6 comments · Fixed by #247
Closed

better handle missing dependancies #69

fantapop opened this issue Sep 25, 2019 · 6 comments · Fixed by #247
Assignees
Labels
documentation Improvements or additions to documentation estimate/4h Need 4 hours to be done good first issue Good for newcomers

Comments

@fantapop
Copy link

it's unclear from the documentation that various hooks don't work unless you install a separate tool into the path. It would be great to call this out on README. I was running terraform_docs_replace and it was just writing an empty file. I had to dive into the code to determine that it requires a separate install.

Does pre-commit not support a way to install the dependencies? Unfortunately, my team won't be able to use those hooks since it doesn't automatically install them.

@antonbabenko
Copy link
Owner

antonbabenko commented Sep 25, 2019

Hi Christopher,

There can be a way to verify that dependencies are installed, but it will make invocation much slower.

I agree we could make README more complete and describe dependencies more accurately. Pull request and ideas are welcome.

@MaxymVlasov MaxymVlasov added good first issue Good for newcomers documentation Improvements or additions to documentation labels Aug 19, 2021
@MaxymVlasov MaxymVlasov added the estimate/4h Need 4 hours to be done label Sep 9, 2021
@MaxymVlasov MaxymVlasov added this to the Bug and docs fixes milestone Sep 9, 2021
@github-actions
Copy link

This issue has been automatically marked as stale because it has been open 30 days
with no activity. Remove stale label or comment or this issue will be closed in 10 days

@github-actions github-actions bot added the stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 10, 2021
@MaxymVlasov MaxymVlasov removed the stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 14, 2021
@MaxymVlasov MaxymVlasov self-assigned this Oct 15, 2021
@afeld
Copy link

afeld commented Nov 22, 2022

Not sure if this was discussed in a different issue, but I see that some other hooks ship with dependencies, or download them if missing (not sure which); what if pre-commit-terraform did so with it's dependencies?

The specific problem we're running into is that our pre-commit.ci run is failing due to Terraform not being installed in the runner.

Note this would also make installation easier for those that might not have Terraform installed (#445), such as a monorepo where Terraform is mixed with app code, worked on by different people.

Thanks!

@MaxymVlasov
Copy link
Collaborator

@afeld that's not possible to do natively via pre-commit, check pre-commit/pre-commit#1453

@yuvipanda
Copy link

yuvipanda commented Jun 1, 2023

I forked the shellcheck-py approach and did the exact same for terraform: https://github.com/yuvipanda/terraform-bin. It's not published on PyPI, but this approach works fine for pre-commit.ci!

I currently have a pre-commit-hooks.yaml file setup on that repo so it is used directly. However, if possible, perhaps it could be made a dependency of this repo, so I could use this repo instead? This way, it would work fine on pre-commit.ci without any issues as well :) Am happy to transfer ownership, etc as needed too.

@MaxymVlasov
Copy link
Collaborator

@yuvipanda if you'd like to talk about this - please open a new issue.

You're the first folk on my way who use pre-commit.ci, when they can be run in the company's CIs or as GitHub workflow. Also, 100 users are a quite low limit.

So, I don't think that supporting a solution that will work only with this CI is worth anything.

If it can run not only in pre-commit.ci, then it relates to #418 a little bit.

Repository owner locked and limited conversation to collaborators Jun 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation estimate/4h Need 4 hours to be done good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants