-
Notifications
You must be signed in to change notification settings - Fork 18
80 lines (78 loc) · 2.51 KB
/
lint.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: lint
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
autoformatter:
name: autoformat check
concurrency:
group: lint-autoformat-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Restore
run: dotnet restore ./src/YdbSdk.sln
- name: Install ReSharper
run: dotnet tool install -g JetBrains.ReSharper.GlobalTools
- name: format all files with auto-formatter
run: bash ./.github/scripts/format-all-dotnet-code.sh ./src/ YdbSdk.sln "Custom Cleanup"
- name: Check repository diff
run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken"
inspection:
runs-on: ubuntu-latest
name: Inspection
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0.x'
- name: Restore
run: dotnet restore ./src/YdbSdk.sln
- name: Inspect code
uses: muno92/resharper_inspectcode@v1
with:
solutionPath: ./src/YdbSdk.sln
version: 2023.2.1
include: |
**.cs
**.cshtml
minimumReportSeverity: WARNING
ignoreIssueType: |
UnusedField.Compiler,
UnusedVariable.Compiler,
UnusedAutoPropertyAccessor.Global,
UnusedAnonymousMethodSignature,
UnusedNullableDirective,
UnusedTupleComponentInReturnValue,
UnusedLocalFunction.Compiler,
UnusedLocalFunctionReturnValue,
UnusedMethodReturnValue.Global,
UnusedType.Global,
UnusedMemberInSuper.Global,
UnusedMember.Global,
UnusedMemberHierarchy.Global,
UnusedLabel,
UnusedParameter.Global,
UnusedParameterInPartialMethod,
UnusedPositionalParameterCompiler,
UnusedTypeParameter,
NotAccessedField.Compiler,
NotAccessedVariable.Compiler,
NotAccessedField.Global,
NotAccessedPositionalProperty.Global,
NotAccessedVariable,
NotAccessedOutParameterVariable,
NotAccessedPrimaryConstructorParameterCompiler,
InconsistentNaming,
CollectionNeverUpdated.Global