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

Support clang format and format almost all C++ code #423

Merged
merged 3 commits into from
Nov 15, 2023

Conversation

wiryls
Copy link
Collaborator

@wiryls wiryls commented Nov 14, 2023

This PR introduces the following changes:

  1. Add some .clang-format files
  2. Format all DIPU code
    • Linux:
      find . \( -iname *.hpp -o -iname *.h -o -iname *.cpp \) -not -path '*/third_party/*' | xargs clang-format -i -style=file
    • Windows:
      Get-ChildItem -Recurse -Include ("*.cpp", "*.hpp", "*.h") | foreach { & clang-format -i -style=file $_.FullName }
  3. Add CI configuration for clang-format

@wiryls wiryls force-pushed the feature/clang_format branch from 60c1e2b to 2e868f7 Compare November 14, 2023 09:10
@wiryls wiryls changed the title Add clang format and format almost all code Support clang format and format almost all C++ code Nov 14, 2023
@mrdanielw mrdanielw requested a review from Wrench-Git November 14, 2023 10:44
@wiryls wiryls force-pushed the feature/clang_format branch from 7464612 to e575fed Compare November 14, 2023 12:02
Copy link
Collaborator

@lljbash lljbash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加一个 linux 上的用 find 和 xargs 拼的脚本吧,方便后续大家跑

@mrdanielw mrdanielw merged commit fa1f0c8 into main Nov 15, 2023
18 checks passed
@wiryls wiryls deleted the feature/clang_format branch November 21, 2023 07:52
@lljbash lljbash mentioned this pull request Nov 21, 2023
7 tasks
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.

5 participants