3mdeb / hooks

MIT License
2 stars 0 forks source link

pre-commit: add #2

Closed macpijan closed 11 months ago

macpijan commented 1 year ago

This MR introduces a script for populating pre-commit config in a given repository. The goal would be that this is the central place for our pre-commit configuration, and when we need to init pre-commit in another repository, we use these set of scripts.

The configs for pre-commit and linters come from various places we have already used pre-commit already, mainly from dasharo/docs repository.

Ideally, the successful review would involve enabling pre-commit in some repo, using the: pre-commit-init.py - such as in this example:

./pre-commit-init/pre-commit-init.py /home/macpijan/projects/github/3mdeb/3mdeb-secpack "markdown bash"

pietrushnic commented 1 year ago

@macpijan, do you know how I should approach the review of this PR? I have no idea what you are trying to achieve here (no description in commits or PR), and the change is not small.

macpijan commented 11 months ago

@pietrushnic You are right, apologies. I have updated the MR description.

I have also asked @filipleple to try using this on a new repo: https://github.com/Dasharo/dcu

macpijan commented 11 months ago

@filipleple I have added skipping docker in pre-commit.ci: 1f38a7de32afbe9003f185f10a63e9290538a5f2 please approve if no further comments.

And apply such a change to this repo: https://github.com/Dasharo/dcu