final2 #4
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: Unity C# Linter | |
on: | |
push: # Trigger on every push | |
pull_request: # Also run on pull requests | |
jobs: | |
lint: | |
name: Run C# Linter | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: '7.x' # Adjust to the required .NET version for Unity | |
- name: Install dotnet-format | |
run: dotnet tool install -g dotnet-format | |
- name: Run dotnet-format | |
# Run dotnet-format in check mode to identify issues only in .cs files in Assets/Scripts and subfolders | |
run: dotnet-format Assets/Scripts --check --folder --include **/*.cs --verbosity diagnostic |