forked from FreeRTOS/FreeRTOS-Plus-TCP
-
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.
Uncrustify PR Check Update (FreeRTOS#969)
* Update uncrustify to use version other repos use, clean up the way it runs, formatting changes to needed files * Moving the lexicon.txt to where it lives in all other repos * Removing executable permissions from .c files ---------
- Loading branch information
Showing
47 changed files
with
1,831 additions
and
1,832 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
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 |
---|---|---|
|
@@ -8,8 +8,7 @@ jobs: | |
Uncrustify: | ||
name: Run_Uncrustify | ||
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/bot run uncrustify' }} | ||
runs-on: ubuntu-20.04 | ||
container: ubuntu:18.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Dump GitHub context | ||
env: | ||
|
@@ -41,16 +40,35 @@ jobs: | |
repository: ${{ steps.upstreamrepo.outputs.RemoteRepo }} | ||
ref: ${{ steps.upstreambranch.outputs.branchname }} | ||
- name: Install Uncrustify | ||
run: apt-get update && apt-get --assume-yes install uncrustify | ||
run: | | ||
: # Install Uncrustify | ||
echo "::group::Install Uncrustify" | ||
sudo apt-get update && apt-get --assume-yes install uncrustify | ||
echo "::endgroup::" | ||
- name: Run Uncrustify | ||
run: | | ||
: # Uncrustify on C files while ignoring symlinks. | ||
: # Make a collapsible section in the log to run uncrustify | ||
echo "::group::Uncrustify Check" | ||
uncrustify --version | ||
find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} + | ||
echo "::endgroup::" | ||
echo -e "\033[32;3mUncrustify Formatting Applied\033[0m" | ||
- name: Push changes to upstream repository | ||
run: | | ||
: # Push changes to upstream repository | ||
echo "::group::Push changes to upstream repository" | ||
git config --global --add safe.directory '*' | ||
git config --global user.name 'GitHub Action' | ||
git config --global user.email '[email protected]' | ||
git add -A | ||
git commit -m "Uncrustify: triggered by comment." | ||
echo "::endgroup::" | ||
git push | ||
if [ "$?" = "0" ]; then | ||
echo -e "\033[32;3mPushed formatting changes, don't forget to run 'git pull'!\033[0m" | ||
exit 0 | ||
else | ||
echo -e "\033[32;31mFailed to push the formatting changes\033[0m" | ||
exit 1 | ||
fi |
0
.github/lexicon.txt → lexicon.txt
100755 → 100644
File renamed without changes.
Oops, something went wrong.