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

Enforce schema validation on pre-commit. #32

Merged
merged 7 commits into from
Nov 8, 2023
Merged

Conversation

amrc-benmorrow
Copy link
Contributor

We are wasting too much time committing invalid schemas. Set up a pre-commit hook which enforces validity.

@Kallb123
Copy link

Kallb123 commented Nov 6, 2023

Since you're on GH.com you could run this as an Action on any PRs? It wouldn't let you merge invalid branches then

@amrc-benmorrow
Copy link
Contributor Author

@Kallb123 Yes, maybe... I find GH actions annoying to set up :). I think we'd want to leave it as a pre-commit hook in any case, as it saves time pushing invalid code just to have the merge rejected.

@Kallb123
Copy link

Kallb123 commented Nov 6, 2023

It is pretty wasteful to push and then find it's failed. How do you actually distribute or enforce a client-side hook though? Since they're not in the repo, do you share it separately?

@amrc-benmorrow
Copy link
Contributor Author

OK, I'm being stupid; I hadn't realised this hadn't committed the .git/hooks/pre-commit script. Let me look a little further...

@AlexGodbehere
Copy link
Contributor

Github Action added.

@amrc-benmorrow amrc-benmorrow merged commit cdd2bef into main Nov 8, 2023
1 check passed
@AlexGodbehere AlexGodbehere deleted the feature/bm-validate branch November 8, 2023 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants