File tree 4 files changed +17
-3
lines changed
4 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 1
1
# GitHub Action: Run Android Lint with reviewdog
2
2
3
- This action runs [ Andriod Lint] ( https://developer.android.com/studio/write/lint ) with
3
+ This action runs [ Android Lint] ( https://developer.android.com/studio/write/lint ) with
4
4
[ reviewdog] ( https://github.com/reviewdog/reviewdog ) .
5
5
6
6
## Inputs
@@ -24,6 +24,11 @@ The default is `error`.
24
24
Optional. Reporter of reviewdog command [ ` github-check ` , ` github-pr-check ` ,` github-pr-review ` ] .
25
25
The default is ` github-check ` .
26
26
27
+ #### ` reviewdog_flags `
28
+
29
+ Optional. Additional flags to be passed to reviewdog cli.
30
+ The default is ``.
31
+
27
32
## Example usage
28
33
29
34
[ Example repo] ( https://github.com/DVDAndroid/action-android-lint-example )
Original file line number Diff line number Diff line change @@ -23,6 +23,11 @@ inputs:
23
23
required : false
24
24
default : ' github-check'
25
25
26
+ reviewdog_flags :
27
+ description : ' Additional reviewdog flags'
28
+ required : false
29
+ default : ' '
30
+
26
31
runs :
27
32
using : ' docker'
28
33
image : ' Dockerfile'
31
36
- ${{ inputs.lint_xml_file }}
32
37
- ${{ inputs.level }}
33
38
- ${{ inputs.reporter }}
39
+ - ${{ inputs.reviewdog_flags }}
34
40
35
41
branding :
36
42
icon : ' smartphone'
Original file line number Diff line number Diff line change 34
34
else :
35
35
error .attrib ['column' ] = str (0 )
36
36
37
- error .attrib ['severity' ] = 'error'
37
+ if 'severity' in issue .attrib :
38
+ error .attrib ['severity' ] = issue .attrib ['severity' ]
39
+ else :
40
+ error .attrib ['severity' ] = 'info'
38
41
39
42
issueId = issue .attrib ['id' ]
40
43
message = issue .attrib ['message' ]
Original file line number Diff line number Diff line change 3
3
export REVIEWDOG_GITHUB_API_TOKEN=" ${INPUT_GITHUB_TOKEN} "
4
4
5
5
python3 /usr/local/bin/converter.py $GITHUB_WORKSPACE /${INPUT_LINT_XML_FILE}
6
- cat output_checkstyle.xml | reviewdog -f=checkstyle -name=" Android Lint" -reporter=" ${INPUT_REPORTER} " -level=" ${INPUT_LEVEL} "
6
+ cat output_checkstyle.xml | reviewdog -f=checkstyle -name=" Android Lint" -reporter=" ${INPUT_REPORTER} " -level=" ${INPUT_LEVEL} " ${INPUT_REVIEWDOG_FLAGS}
You can’t perform that action at this time.
0 commit comments