Skip to content

pre-commit hooks for Cookbooks? #119

Open
@brian-rose

Description

@brian-rose

I'm confused about the current state of our reliance on pre-commit for code quality.

In Foundations we have pre-commit.ci running on every PR. This service runs as a GitHub App linked to the Foundations repo.

I don't think we've ever turned this on for any Cookbook repos.

However as of #103 the Template repo has a .pre-commit-config.yaml, and pre-commit was run locally once on the repo.

All subsequent copies of the Template have the .pre-commit-config.yaml file included, but we're using it for anything.

It would be great to get this cleaned up for consistency. I see three options:

  1. Get rid of the .precommit-config.yaml file, don't enforce any code style
  2. Add guidance to our Contributor's Guide on how to install and run pre-commit locally on a Cookbook repo
  3. Switch on the pre-commit.ci service for all existing Cookbook repos, and add guidance on how to do this for new Cookbooks.

Option 3 results in the strictest adherence to consistent code quality and formatting, with some potential for user confusion.

Option 1 is the easiest.

Option 2 is a wishy-washy bad compromise in my opinion.

@ProjectPythia/infrastructure thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    infrastructureInfrastructure related issue

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions