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

Align Codebase with Google C++ Style and Modern Practices #22

Merged
merged 22 commits into from
Aug 14, 2024

Conversation

hankhsu1996
Copy link
Owner

This PR refactors the codebase to follow the Google C++ style, which is widely recognized in open-source projects. Customizations have been made to better align with modern C++ practices.

Key Changes

  • Google C++ Style: Updated .clang-format to adhere to Google style, with modifications tailored for modern C++ code.

    • Adjustments include:
      • AlignAfterOpenBracket: AlwaysBreak for improved readability in cases like trailing return types and complex function signatures.
      • AllowShortFunctionsOnASingleLine: false to ensure consistency in formatting, especially when dealing with more complex modern C++ features.
  • Clang-Tidy Integration: Added a .clang-tidy configuration.

    • Enabled google-*, modernize-*, and additional checks to enforce coding standards and encourage the use of modern C++ best practices.
  • Codebase Refactoring: Reformatted all files to comply with the updated styling rules.

    • Note: These changes are purely internal and do not affect the public API.

Impact

  • Enhances code consistency and readability.
  • Ensures the codebase is up-to-date with modern C++ standards, accommodating features like trailing return types and other contemporary language features.

@hankhsu1996 hankhsu1996 merged commit ae48a4e into main Aug 14, 2024
5 checks passed
@hankhsu1996 hankhsu1996 deleted the feature/google-style branch August 14, 2024 04:14
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