Skip to content

Commit

Permalink
Merge branch 'main' into update_meru800_configs
Browse files Browse the repository at this point in the history
  • Loading branch information
aalamsi22 authored Sep 16, 2024
2 parents a50aeb6 + 9e588f3 commit 400de2f
Show file tree
Hide file tree
Showing 64 changed files with 844 additions and 529 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/clang-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: ClangFormat Lint

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
clang-format-check:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install clang-format
run: sudo apt-get install -y clang-format

- name: Get changed files
id: changed-files
run: |
if [ ${{ github.event_name }} == 'pull_request' ]; then
# For pull requests, compare against the base branch
echo "FILES=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -E '\.(cpp|h)$' | xargs)" >> $GITHUB_OUTPUT
else
# For pushes, compare against the parent commit
echo "FILES=$(git diff --name-only --diff-filter=ACMRT ${{ github.event.before }} ${{ github.sha }} | grep -E '\.(cpp|h)$' | xargs)" >> $GITHUB_OUTPUT
fi
- name: Run clang-format
run: |
for file in ${{ steps.changed-files.outputs.FILES }}; do
clang-format -style=file -i "$file"
done
git diff --exit-code
- name: Suggest changes if formatting is incorrect
if: failure()
run: |
echo "::error::Formatting issues found. Please run clang-format on your changes and commit the results."
git diff
30 changes: 15 additions & 15 deletions buck2
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,62 @@
"name": "buck2",
"platforms": {
"macos-aarch64": {
"size": 23837292,
"size": 23905563,
"hash": "blake3",
"digest": "45d97541497dab8c939f1650ea7282f88ce031dcb98a4412809600b36bf9d2ac",
"digest": "2716aabc7e2b68a0eba8d68908f604321dbe19673b9ed2c6f659cda2d263fa3a",
"format": "zst",
"path": "buck2-aarch64-apple-darwin",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-09-02/buck2-aarch64-apple-darwin.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-09-16/buck2-aarch64-apple-darwin.zst"
}
]
},
"linux-aarch64": {
"size": 26010757,
"size": 26041556,
"hash": "blake3",
"digest": "05901b2db0e2fcaf4e5ff3b1cd2a7ce57aeeaf18e5c8b8c13f4743246cc51cfd",
"digest": "296ca8153596f29c73243a792bb235ed84bfd77a2d26c2f62eeecb1d272e3a90",
"format": "zst",
"path": "buck2-aarch64-unknown-linux-musl",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-09-02/buck2-aarch64-unknown-linux-musl.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-09-16/buck2-aarch64-unknown-linux-musl.zst"
}
]
},
"macos-x86_64": {
"size": 25454662,
"size": 25480555,
"hash": "blake3",
"digest": "1a734c77fa6ee124b9e872e44d48917eb0e8388373930b3c8f5a53059c04c157",
"digest": "cf529f35b88a4a05e3a727aac7fad0e1549fac154d0b7effdaa481f942b6087e",
"format": "zst",
"path": "buck2-x86_64-apple-darwin",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-09-02/buck2-x86_64-apple-darwin.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-09-16/buck2-x86_64-apple-darwin.zst"
}
]
},
"windows-x86_64": {
"size": 20924720,
"size": 20968937,
"hash": "blake3",
"digest": "903c00ce0095f5c423f141b9d1570f91edf2e6f045d41415409b5e4d5f973f05",
"digest": "7eab847191add144fdf9b979437a1d16bcf23659e7e70acbbf43ba02a901fa2e",
"format": "zst",
"path": "buck2-x86_64-pc-windows-msvc.exe",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-09-02/buck2-x86_64-pc-windows-msvc.exe.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-09-16/buck2-x86_64-pc-windows-msvc.exe.zst"
}
]
},
"linux-x86_64": {
"size": 26842328,
"size": 26879584,
"hash": "blake3",
"digest": "b11fbc26e598874b0bdfde263c1c34d18ac547cd1a4fcb1f9693807cf9ba86e3",
"digest": "c50374aa898839e93a89a881bd92687cd431bb8961c24a18c0b40c30705327b2",
"format": "zst",
"path": "buck2-x86_64-unknown-linux-musl",
"providers": [
{
"url": "https://github.com/facebook/buck2/releases/download/2024-09-02/buck2-x86_64-unknown-linux-musl.zst"
"url": "https://github.com/facebook/buck2/releases/download/2024-09-16/buck2-x86_64-unknown-linux-musl.zst"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/fb303-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 9445fd5d2ee32cdf39d3d94c2116af52a9c8c586
Subproject commit dd6f8d09407455260cf0713db2e116cfa19acab4
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/fbthrift-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 498349f983f3d4ba8b514129e61afc6c8f479746
Subproject commit e3d27fc1f7ddbfdd6fa9a9722b20fe75f53209bc
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/folly-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 8a5e31a1ce42d05133b9b2951f2bb0345cea93cc
Subproject commit f7189afafc220bf1fea3aa118158cf0b7ad6b9ed
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebook/wangle-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit 6ae7e1997b758a4877b70b447655c5c260155912
Subproject commit 3e96366fb9a4366b0b191718d9cc1af992442b72
2 changes: 1 addition & 1 deletion build/deps/github_hashes/facebookincubator/fizz-rev.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Subproject commit e7642d8a878941d38ba9db1b04527db0d24294fe
Subproject commit 15356f47e089a115d859a000bd5f7c33581c6505
2 changes: 1 addition & 1 deletion build/fbcode_builder/manifests/libcurl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = libcurl

[rpms]
libcurl-devel
libcurl
libcurl-minimal

[debs]
libcurl4-openssl-dev
Expand Down
4 changes: 4 additions & 0 deletions cmake/PlatformFanService.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ target_link_libraries(fan_service_lib
product_info
common_file_utils
platform_config_lib
platform_name_lib
platform_utils
fan_service_config_types_cpp2
gpiod_line
sensor_service_cpp2
fan_service_cpp2
Folly::folly
Expand Down Expand Up @@ -71,6 +73,8 @@ add_executable(fan_service_sw_test
target_link_libraries(fan_service_sw_test
fan_service_lib
Folly::folly
${LIBGPIOD}
gpiod_line
${GTEST}
${LIBGMOCK_LIBRARIES}
)
Expand Down
1 change: 1 addition & 0 deletions cmake/PlatformFwUtil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ add_executable(fw_util
target_link_libraries(fw_util
Folly::folly
platform_config_lib
platform_name_lib
platform_utils
FBThrift::thriftcpp2
fw_util_config-cpp2-types
Expand Down
1 change: 1 addition & 0 deletions cmake/PlatformSensorService.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ add_library(sensor_service_lib
target_link_libraries(sensor_service_lib
log_thrift_call
platform_config_lib
platform_name_lib
platform_utils
sensor_service_utils
sensor_service_cpp2
Expand Down
1 change: 1 addition & 0 deletions cmake/PlatformWeutil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ target_link_libraries(weutil_lib
weutil_config_cpp2
weutil_fboss_eeprom_parser
platform_config_lib
platform_name_lib
ioctl_smbus_eeprom_reader
)

Expand Down
114 changes: 114 additions & 0 deletions fboss/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# The primary clang-format config file.
# TODO(afuller): Set these settings when they aren't broken:
# - AllowShortBlocksOnASingleLine: Empty
---
AccessModifierOffset: -1
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveBitFields: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: Left
AlignOperands: DontAlign
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: true
AllowAllConstructorInitializersOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortEnumsOnASingleLine: true
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Empty
AllowShortLambdasOnASingleLine: All
AllowShortIfStatementsOnASingleLine: Never
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Attach
BreakInheritanceList: BeforeColon
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: false
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DeriveLineEnding: true
DerivePointerAlignment: false
DisableFormat: false
FixNamespaceComments: true
ForEachMacros:
- FOR_EACH
- FOR_EACH_R
- FOR_EACH_RANGE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^<.*\.h(pp)?>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IndentCaseLabels: true
IndentCaseBlocks: false
IndentGotoLabels: true
IndentPPDirectives: None
IndentExternBlock: AfterExternBlock
IndentWidth: 2
IndentWrappedFunctionNames: false
InsertTrailingCommas: None
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 2
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 2
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: true
SortUsingDeclarations: true
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: true
SpaceInEmptyBlock: false
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: false
SpacesInConditionalStatement: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false
Standard: Latest
TabWidth: 8
UseCRLF: false
UseTab: Never
...
Loading

0 comments on commit 400de2f

Please sign in to comment.