-
Notifications
You must be signed in to change notification settings - Fork 3
49 lines (38 loc) · 1012 Bytes
/
linter.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Linter
on:
pull_request:
branches: [ main ]
jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Restore dependencies
run: dotnet restore
- name: CSharpier format check
name: Linter check
on:
workflow_dispatch:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linter-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
- name: Dotnet restore
run: dotnet tool restore
- name: CSharpier format check
run: |
dotnet csharpier . --check
echo "run 'dotnet csharpier .' to format the code automatically"
echo "run 'dotnet build' to fix the formatting of the code automatically"