forked from ScaCap/action-ktlint
-
Notifications
You must be signed in to change notification settings - Fork 1
/
action.yml
71 lines (70 loc) · 1.9 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
name: 'Run ktlint with reviewdog'
description: '🐶 Run ktlint with reviewdog on pull requests to enforce best practices'
author: 'renatoabreu11 (ScaCap)'
inputs:
github_token:
description: 'GITHUB_TOKEN'
required: true
level:
description: 'Report level for reviewdog [info,warning,error]'
required: false
default: 'error'
reporter:
description: |
Reporter of reviewdog command [github-pr-check,github-check,github-pr-review].
Default is github-pr-check.
required: false
default: 'github-pr-check'
filter_mode:
description: |
Filtering mode for the reviewdog command [added,diff_context,file,nofilter].
Default is added.
required: false
default: 'added'
fail_on_error:
description: |
Exit code for reviewdog when errors are found [true,false]
Default is `false`.
required: false
default: 'false'
relative:
description: Print files relative to the working directory
required: false
default: 'true'
android:
description: Run Ktlint with Android Kotlin Style Guide
required: false
default: 'false'
baseline:
description: Use a baseline configuration
required: false
default: ''
ktlint_version:
description: Defines the ktlint version to use
required: false
default: 'latest'
name:
description: Reviewdog report name
required: false
default: 'ktlint'
file_glob:
description: Optionally defines a file glob to identify files to be checked
required: false
default: ''
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.github_token }}
- ${{ inputs.level }}
- ${{ inputs.reporter }}
- ${{ inputs.fail_on_error }}
- ${{ inputs.filter_mode }}
- ${{ inputs.relative }}
- ${{ inputs.android }}
- ${{ inputs.baseline }}
- ${{ inputs.ktlint_version }}
- ${{ inputs.name }}
branding:
icon: 'edit'
color: 'blue'