Skip to content

Commit 58b5cfe

Browse files
author
ויויאן אומנסקי
committed
Add linter workflow
1 parent 5e80f05 commit 58b5cfe

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

.github/workflows/linter.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Unity C# Linter
2+
3+
on:
4+
push: # Trigger on every push
5+
pull_request: # Also run on pull requests
6+
7+
jobs:
8+
lint:
9+
name: Run C# Linter
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v3
15+
16+
- name: Setup .NET
17+
uses: actions/setup-dotnet@v3
18+
with:
19+
dotnet-version: '7.x' # Adjust to the required .NET version for Unity
20+
21+
- name: Install dotnet-format
22+
run: dotnet tool install -g dotnet-format
23+
24+
- name: Run dotnet-format
25+
# Run dotnet-format in check mode to identify issues only in .cs files in Assets/Scripts and subfolders
26+
run: dotnet-format Assets/Scripts --check --folder --include **/*.cs --verbosity diagnostic

0 commit comments

Comments
 (0)