-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Add code formatting check to CI #3778
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
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
b4968ec
Format Fw/Buffer Fw/Cmd and Fw/Com
thomas-bc 4a3f0c7
add code format check
thomas-bc 4dc955e
fix branch to pull from
thomas-bc 685916f
debug
thomas-bc 2aca08d
uninstall before install
thomas-bc 7302cf0
Use pip3
thomas-bc 1f03a68
debug with tmate
thomas-bc 8e45204
put fprime-tools dep in req.txt
thomas-bc e79ed7a
test
thomas-bc 5a620a5
req hash
thomas-bc a53cd2c
setup python first
thomas-bc c40b7aa
use nasa pointer
thomas-bc 24fbc3c
Revert "Format Fw/Buffer Fw/Cmd and Fw/Com"
thomas-bc 93418b1
Merge remote-tracking branch 'nasa/devel' into ci/formatting
thomas-bc 11f28c4
Format Fw/Buffer Fw/Cmd and Fw/Com
thomas-bc f1e2a56
Update to fprime-tools 4.0.0a2
thomas-bc 08a9cad
Use env var for readability
thomas-bc 9f1d62d
naming
thomas-bc d24aee0
Add clang-format to requirements.txt
thomas-bc f686976
Skip clang-format requirement on armv7l platform
thomas-bc 9575fc9
Merge branch 'devel' into ci/formatting
thomas-bc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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,38 @@ | ||
| name: "Code Format Check" | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ devel, release/**, ci/** ] | ||
| pull_request: | ||
| # The branches below must be a subset of the branches above | ||
| branches: [ devel, release/** ] | ||
| paths-ignore: | ||
| - 'docs/**' | ||
| - '**.md' | ||
| - '.github/actions/spelling/**' | ||
| - '.github/ISSUE_TEMPLATE/**' | ||
|
|
||
| jobs: | ||
| cpp-formatting: | ||
| name: C++ Formatting | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: "Checkout F´ Repository" | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
| submodules: true | ||
| - name: "Setup Python" | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.12 | ||
| - uses: ./.github/actions/setup | ||
| - name: "Check C++ Formatting" | ||
| env: | ||
| CHECKED_DIRS: >- | ||
| Fw/Buffer | ||
| Fw/Cmd | ||
| Fw/Com | ||
| run: | | ||
| fprime-util format --check --dirs $CHECKED_DIRS | ||
| shell: bash |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check notice
Code scanning / CodeQL
More than one statement per line Note