Skip to content

Commit

Permalink
Update the uncrustify bot, force a uncrustify failure to try the action
Browse files Browse the repository at this point in the history
  • Loading branch information
Soren Ptak committed Jul 20, 2023
1 parent 9e2855c commit 94d5461
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/uncrustify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ jobs:
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
steps:
- name: Dump GitHub context
env:
Expand Down Expand Up @@ -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
9 changes: 6 additions & 3 deletions source/FreeRTOS_DNS_Callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,23 @@

vTaskSuspendAll();
{
for( pxIterator = ( const ListItem_t * ) listGET_NEXT( xEnd );
for( pxIterator = ( const ListItem_t * ) listGET_NEXT( xEnd );
pxIterator != ( const ListItem_t * ) xEnd;
pxIterator = ( const ListItem_t * ) listGET_NEXT( pxIterator ) )
{
BaseType_t xMatching;
DNSCallback_t * pxCallback = ( ( DNSCallback_t * ) listGET_LIST_ITEM_OWNER( pxIterator ) );
#if ( ipconfigUSE_MDNS == 1 )
/* mDNS port 5353. */
if( pxSet->usPortNumber == FreeRTOS_htons( ipMDNS_PORT ) )
if ( pxSet->usPortNumber == FreeRTOS_htons( ipMDNS_PORT ) )
{
/* In mDNS, the query ID field is ignored and the
/* In mDNS, the query ID field is ignored and the
* hostname will be compared with outstanding requests. */

xMatching = ( strcasecmp( pxCallback->pcName, pxSet->pcName ) == 0 ) ? pdTRUE : pdFALSE;



}
else
#endif /* if ( ipconfigUSE_MDNS == 1 ) */
Expand Down
4 changes: 2 additions & 2 deletions source/include/FreeRTOS_DNS.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ typedef enum xIPPreference
{
xPreferenceNone,
xPreferenceIPv4,
#if ( ipconfigUSE_IPv6 != 0 )
#if ( ipconfigUSE_IPv6 != 0 )
xPreferenceIPv6,
#endif
} IPPreference_t;

/** @brief This variable determines he choice of DNS server, either IPv4 or IPv6. */
/** @brief This variable determines he choice of DNS server, either IPv4 or IPv6. */
extern IPPreference_t xDNS_IP_Preference;

#if ( ipconfigUSE_NBNS != 0 )
Expand Down

0 comments on commit 94d5461

Please sign in to comment.