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

Add pre-commit.com hooks for lint-collection-docs #231

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gotmax23
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

I'm not sure this is a good idea.

  1. Who installs ansible-core?
  2. Who installs the required collections (for docs fragments, references, ...)?

Co-authored-by: Felix Fontein <[email protected]>
@ssbarnea ssbarnea changed the title add pre-commit.com hooks for lint-collection-docs Add pre-commit.com hooks for lint-collection-docs Aug 19, 2024
@ssbarnea ssbarnea added the bug Something isn't working label Aug 19, 2024
@ssbarnea
Copy link
Member

I'm not sure this is a good idea.

  1. Who installs ansible-core?
  2. Who installs the required collections (for docs fragments, references, ...)?

I like the idea but there are some problems with using with pre-commit:

  • pre-commit.ci does not allow network access, so installing a collection would not be possible with them. Still, this does not mean we cannot use pre-commit itself and run it in our own CI/CD, is just that we need to skip running it on that SaaS.

  • By definition running pre-commit should not ask user to to other preparatory tasks, like installing collection. This tells me that we need to do it inside the hook, so it would self-contained.

Copy link
Collaborator

@felixfontein felixfontein left a comment

Choose a reason for hiding this comment

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

Leaving a negative review so this won't get merged prematurely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants