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

Perform basic conventional checks in Git pre-commit hook #7765

Open
1 of 5 tasks
s373nZ opened this issue Oct 25, 2024 · 1 comment
Open
1 of 5 tasks

Perform basic conventional checks in Git pre-commit hook #7765

s373nZ opened this issue Oct 25, 2024 · 1 comment

Comments

@s373nZ
Copy link
Contributor

s373nZ commented Oct 25, 2024

Following from this conversation on Discord, @cdecker writes:

Sure, there are plenty of pre-commit plugins for that type of lint. A quick search surfaced https://github.com/compilerla/conventional-pre-commit for example.
I also wonder if we should remove some of our custom tooling in favor of better maintained conventional tools (shellcheck run, JSON schema format check, JSON schema validation, check that files were regenerated when needed, etc. currently there are loads of make targets that just check something in ci, when really we want to enforce them for new code. The upside would be that we check during commit, but the same rules can just be double checked in ci from the same config.

This issue represents the beginning of an initiative to improve standardization and offload some of the CI checks into the developer workflow, starting with the following brainstorm:

  • shellcheck run
  • JSON schema format check
  • Check regenerated files
  • lint commit messages and validate against accepted conventions
  • Python linting
@cdecker
Copy link
Member

cdecker commented Nov 29, 2024

I added a first draft formatting the python files here: #7884

It took me a bit of time to figure out how to avoid an all-or-nothing formatting change, and luckily I found --from-ref and --to-ref which we can use to limit to just the PRs changed files. So we incrementally fix things up as we edit files.

More lints and checks welcome ^^

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

No branches or pull requests

2 participants