Merging 1.7.1
#3125
Workflow file for this run
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
name: format code | |
on: | |
pull_request: | |
jobs: | |
format-code: | |
name: Format Code | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Format C, C++, Objective-C and header files | |
run: > | |
find samples/. -type f | |
-name "*.h" | |
-o -name "*.c" | |
-o -name "*.cpp" | |
-o -name "*.m" | |
| xargs clang-format -i -style=file | |
- name: Format C# Code Whitespace | |
run: dotnet format whitespace Sentry.Unity.sln --exclude src/sentry-dotnet --verbosity diag | |
# actions/checkout fetches only a single commit in a detached HEAD state. Therefore | |
# we need to pass the current branch, otherwise we can't commit the changes. | |
# GITHUB_HEAD_REF is the name of the head branch. GitHub Actions only sets this for PRs. | |
- name: Commit Formatted Code | |
run: ./scripts/commit-formatted-code.sh $GITHUB_HEAD_REF |