-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
52 lines (48 loc) · 1.48 KB
/
action.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
50
51
52
name: 'Unofficial ReSharper Annotations'
description: 'Annotates code with ReSharper inspections'
inputs:
solution:
description: 'Filepath of the solution to inspect'
required: true
dotnet-version:
required: true
description: '.NET SDK version'
default: '6.0.x'
resharper-version:
description: 'JetBrains.ReSharper.GlobalTools version'
required: true
default: '2023.1.3'
treat-warnings-as-errors:
description: 'Whether to treat any warnings as errors'
required: false
default: 'false'
extra-args:
description: 'Extra arguments to pass to inspectcode'
required: false
runs:
using: 'composite'
steps:
- name: Setup .NET
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: ${{ inputs.dotnet-version }}
- name: Install ReSharper CLI
shell: bash
run: |
dotnet new tool-manifest
dotnet tool install JetBrains.ReSharper.GlobalTools --version ${{ inputs.resharper-version }}
dotnet tool restore
- name: Inspect code with ReSharper
shell: bash
run: >
dotnet jb inspectcode ${{ inputs.solution }}
${{ inputs.extra-args }}
--output=report
--swea
--severity=WARNING
--properties:Configuration=Release
- name: Annotate with inspections
uses: VMelnalksnis/resharper-inspect-action/resharper-annotate@v0.3.1
with:
report: report
treat-warnings-as-errors: ${{ inputs.treat-warnings-as-errors }}