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

Extend golang docs: additional dependencies and tooling semantics #927

Merged
merged 1 commit into from
Feb 10, 2024

Conversation

lubgr
Copy link
Contributor

@lubgr lubgr commented Jan 29, 2024

Minor improvements to the docs on golang hooks:

  • In golang hooks, additional_dependencies can be used. According to the existing docs on other language hooks, I have added a note on that. See also issue It’s not clear which languages can’t be used for local hooks #797.
  • The second paragraph is a summary of my findings from setting up golang hooks. It might be worth adding this for the benefit of others?

@asottile
Copy link
Member

I would remove the second paragraph. there are many poorly written tools in every language so it is not necessary to call them out in the golang section

@lubgr
Copy link
Contributor Author

lubgr commented Jan 29, 2024

Thanks for having a look so quickly!

The second paragraph was not commenting on UI of Go tools, but pointing out a fundamental mismatch of how the entire Go ecosystem works (including the compiler), where individual files have no meaning, only packages contained in directories have. The tools that refuse to work on individual files are hence fully streamlined and provide the least surprise for Go devs. As a consequence, it's hard to write Go hooks for Go code that work as nicely as hooks written in other languages.

But thinking about it again, this only applies to Go hooks written to work with Go code, not Go hooks generally, for any other language.

So long story short, I have remove the paragraph 🙂

Copy link
Member

@asottile asottile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asottile asottile merged commit 93d2279 into pre-commit:main Feb 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants