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

[FEA]: Add pre-commit hook for formatting of python and C++ code #1702

Closed
2 tasks done
mdemoret-nv opened this issue May 16, 2024 · 0 comments · Fixed by #1859
Closed
2 tasks done

[FEA]: Add pre-commit hook for formatting of python and C++ code #1702

mdemoret-nv opened this issue May 16, 2024 · 0 comments · Fixed by #1859
Assignees
Labels
feature request New feature or request

Comments

@mdemoret-nv
Copy link
Contributor

Is this a new feature, an improvement, or a change to existing functionality?

New Feature

How would you describe the priority of this feature request

Low (would be nice)

Please provide a clear description of problem this feature solves

Currently, CI is the only enforcer of correct formatting. Unless your IDE settings are set up to use the same settings as CI, its difficult to get the correct formatting without running CI.

Describe your ideal solution

Add a new pre-commit hook to run the following:

  1. yapf on python code
  2. isort on python code
  3. clang-format on C++ code

These should be quick enough to work in a pre-commit hook. Any other fast linting steps can also be included but linters like pylint and clang-tidy should be avoided due to the long run time.

Additional context

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants