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

feat: auto formatting & linting using pre-commit #1161

Open
wants to merge 1 commit into
base: dev-postgresql
Choose a base branch
from

Conversation

tinyAdapter
Copy link

As documented in the repo, many formatters & linters are used, which can be annoying to manage and execute.

To tackle this, I recommend using pre-commit to combine all formatting, lining, and checking tools into a single run.

Specifically, I added .pre-commit-config.yaml to configure all tools listed in the repo. One can then use

pre-commit run --all-files

in the repo root folder to execute all of them.

I ran the command locally and auto-fixed 402 files. Other linting problems have to be addressed manually, e.g., reinterpret_cast instead of C-style cast. The full log is available here.

Considering whether this automatic process would break the code correctness or not, at least it has passed all written tests (by running the test GitHub action here).

In the future, the pre-commit trigger can be added to GitHub action for checking & auto-fixing.

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.

1 participant