-
Notifications
You must be signed in to change notification settings - Fork 24
Push, Pull Request, Coding Style Check
Michael Zhang edited this page Feb 14, 2024
·
3 revisions
- This SDK only allows the collaborators to direct to
Push
codes into SDK. - Merging Pull Request is considered as a
Push
of commit. - After every
Push
GitHub ActionCheck mbed coding style
will run automatically- If check passed you should see
green tick
- If check passed you should see
- It is a way to contribute codes to the opensource SDK. Please refer the following steps for doing PR to this SDK
- Login your GitHub account
-
fork
the SDK - Edit SDK, make a commit, and
Push
the commit to thefork
SDK - Compare to the original SDK and follow the
PULL_REQUEST_TEMPLATE
to create a PR - Wait for all GitHub Actions check to pass. If not commit the fix of the
PR
, the GitHub Actions check will run again automatically. - When all checks passed, the collaborators will merge the
PR
into the original SDK
- After every
PR
created GitHub ActionCheck mbed coding style
will run automatically- If check passed you should see
green tick
- If check passed you should see
- This SDK is using mbed coding style
- All collaborators and contributors should follow the coding style to maintain the SDK.
- There is a mbed coding check for all
Push
andPR
. It is based on clang format 17. Refer to Coding_Style for detail settings. - You can refer to the following steps to do coding style formatting
- Install clang-format 17 at any platform you comfortable with. Then run
clang-format-17 -n --Werror --style=file:"Coding_Style/.clang-format" $file-name
for the target file to be formatting. - Example using VScode, windows 10.
- Install VScode
- open VScode and go to extension page
- open extension setting
- find
Clang-format: Style
and set asfile
- The
.clang-format
and.clang-format-ignore
should placed at workspace- current folder
- parents folder
- open the file and right click choose
Format Document
- Install clang-format 17 at any platform you comfortable with. Then run