-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
129 lines (111 loc) · 3.68 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
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: 'ZyAction: .NET Lint'
author: Florian Bernd
description: A GitHub Action to lint .NET projects.
branding:
icon: code
color: purple
inputs:
working-directory:
description: >
The working-directory for the action.
Defaults to the repository root directory (`github.workspace`).
If a specific .NET SDK version is to be used, the working directory must point to the
directory that contains the `global.json` or a subdirectory of it.
type: string
required: false
default: ${{ github.workspace }}
workspace:
description: >
The Visual Studio workspace (directory, project- or solution-file).
This path is relative to the `working-directory` unless an absolute path is used.
type: string
required: false
default: ''
diagnostics:
description: >
A newline-separated list of diagnostic IDs to use as a filter when linting code style or
third-party issues. Supports multiline strings.
Default value is whichever IDs are listed in the `.editorconfig` file.
type: string
required: false
default: ''
severity:
description: >
The minimum severity of diagnostics to lint.
Possible values:
- info
- warn
- error
The default value is `warn`.
type: string
required: false
default: ''
include:
description: >
A newline-separated list of relative file or folder paths to include in linting.
The default is all files in the solution or project.
Use `-` to read the list of files from the `pipe` input.
type: string
required: false
default: ''
exclude:
description: >
A newline-separated list of relative file or folder paths to exclude from linting.
The default is none.
Use `-` to read the list of files from the `pipe` input.
type: string
required: false
default: ''
report-path:
description: Produces a JSON report in the specified directory.
type: string
required: false
default: ''
implicit-restore:
description: Execute an implicit restore before linting.
type: boolean
required: false
default: false
use-standalone-tool:
description: >
Uses the standalone version of the `dotnet-format` tool instead of the version bundled
with the .NET SDK.
type: boolean
required: false
default: false
pipe:
description: >
An optional pipe input from which the `include` or `exclude` filenames are to be read.
This must be set to a valid shell command line (bash) that can be used for piping. The
command must output to `stdout` and separate the individual filenames by line breaks.
WARNING:
The command passed to this input will be evaluated and should not come from untrusted
sources.
type: string
required: false
default: ''
runs:
using: composite
steps:
- name: Add Problem Matcher
shell: bash
run: |
echo "::add-matcher::${{ github.action_path }}/problem-matcher.json"
- name: .NET Lint
uses: zyactions/dotnet-format@059ebd22ce2c9b54ee5efc30e65dde422547dadf # v1.1.0
with:
working-directory: ${{ inputs.working-directory }}
workspace: ${{ inputs.workspace }}
diagnostics: ${{ inputs.diagnostics }}
severity: ${{ inputs.severity }}
verify-no-changes: true
include: ${{ inputs.include }}
exclude: ${{ inputs.exclude }}
implicit-restore: ${{ inputs.implicit-restore }}
use-standalone-tool: ${{ inputs.use-standalone-tool }}
pipe: ${{ inputs.pipe }}
- name: Remove Problem Matcher
if: always()
shell: bash
run: |
echo "::remove-matcher owner=dotnet-format::"