Skip to content

Remove redundant tasks and clean up imports #687

Remove redundant tasks and clean up imports

Remove redundant tasks and clean up imports #687

Workflow file for this run

#
# This workflow runs the dotnet formatter on all c-sharp code.
#
name: dotnet format
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check-format:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Restore dotnet tools
run: dotnet tool restore
- name: Check format
run: dotnet format --verify-no-changes --verbosity detailed
- name: Fail if files are not formatted
if: ${{ failure() }}
run: |
echo "Some files are not formatted correctly. Run 'dotnet format' to fix."
exit 1