abacus-develop icon indicating copy to clipboard operation
abacus-develop copied to clipboard

clang-format and clang-tidy is not employed

Open caic99 opened this issue 1 year ago • 2 comments

Describe the Code Quality Issue

clang-format can format c++ source files; clang-tidy is used to perform static analysis, helping improve code quality. Adding CI checks utilizing the existed .clang-tidy and .clang-format in the repo on the new-coming PRs would be better. Some third-party add-ons like https://pre-commit.ci/ is also helpful.

Additional Context

No response

Task list for Issue attackers (only for developers)

  • [ ] Identify the specific code file or section with the code quality issue.
  • [ ] Investigate the issue and determine the root cause.
  • [ ] Research best practices and potential solutions for the identified issue.
  • [ ] Refactor the code to improve code quality, following the suggested solution.
  • [ ] Ensure the refactored code adheres to the project's coding standards.
  • [ ] Test the refactored code to ensure it functions as expected.
  • [ ] Update any relevant documentation, if necessary.
  • [ ] Submit a pull request with the refactored code and a description of the changes made.

caic99 avatar Apr 03 '24 06:04 caic99

Todo:

  • [x] Apply fixes to codes. Please preview the changes at this branch.
  • [ ] Format all codes.
  • [ ] Set up CI pipelines to prettify codes on PRs, not requiring extra works for developers.
    • possible choices: https://pre-commit.ci, https://trunk.io/check/clang-tidy

caic99 avatar Apr 18 '24 02:04 caic99

@mohanchen thinks this function is very important for ABACUS. So, we need a meeting to discuss.

haozhihan avatar Apr 18 '24 02:04 haozhihan