-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding clang format file to each folder (grpc#35722)
<!-- If you know who should review your pull request, please assign it to that person, otherwise the pull request would get assigned randomly. If your pull request is for a specific language, please add the appropriate lang label. --> Closes grpc#35722 COPYBARA_INTEGRATE_REVIEW=grpc#35722 from tanvi-jagtap:tjagtap_2024_01_29_formatting_1000 062eb11 PiperOrigin-RevId: 602512122
- Loading branch information
1 parent
8ea3b41
commit e738963
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
Language: Cpp | ||
BasedOnStyle: Google | ||
DerivePointerAlignment: false | ||
PointerAlignment: Left | ||
IncludeBlocks: Regroup | ||
IncludeCategories: | ||
# port_platform.h is before almost everything | ||
- Regex: '^<grpc/(support|impl/codegen)/port_platform.h>' | ||
Priority: -100 | ||
# ruby.h is even more first if it's included | ||
- Regex: '^<ruby/ruby.h>' | ||
Priority: -200 | ||
# Some platforms (namely msys) need wchar to be included BEFORE | ||
# anything else, especially strsafe.h. | ||
- Regex: '^<wchar.h>' | ||
Priority: 5 | ||
# use priority 100+ for grpc headers so they sort last | ||
# 'system' headers - include things that have " in the names to make them | ||
# stand out and get fixed | ||
- Regex: '^(<|")grpc' | ||
Priority: 100 | ||
# similary using include/ to get system headers should stand out and get | ||
# fixed | ||
- Regex: '^"include/' | ||
Priority: 100 | ||
# source headers go last | ||
- Regex: '^"(src|test)/' | ||
Priority: 101 | ||
# not-grpc headers follow | ||
# first, non system headers that are included like <> - these are all | ||
# local carveouts, and get sorted below c++ but before non grpc "" files | ||
- Regex: '^<(openssl/|uv\.h|ares\.h|address_sorting/|gmock/|gtest/|zlib|zconf|benchmark/|google/)' | ||
Priority: 30 | ||
# first C system headers - they have a . in the filename | ||
- Regex: '^<.*\.' | ||
Priority: 10 | ||
# then C++ system headers - no ., the only thing that will match now | ||
- Regex: '^<' | ||
Priority: 20 | ||
# finally other "" includes go between system headers and our headers | ||
- Regex: '^"' | ||
Priority: 40 | ||
--- | ||
Language: ObjC | ||
BasedOnStyle: Google | ||
ColumnLimit: 100 | ||
ObjCBlockIndentWidth: 2 | ||
--- | ||
Language: Proto | ||
BasedOnStyle: Google | ||
ColumnLimit: 100 | ||
... |