File tree Expand file tree Collapse file tree 11 files changed +38
-26
lines changed Expand file tree Collapse file tree 11 files changed +38
-26
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ changelog:
88 - bug
99 - title : Other Changes
1010 labels :
11- - " * "
11+ - ' * '
1212 exclude :
1313 labels :
1414 - dependencies
Original file line number Diff line number Diff line change 5757 id : test-action
5858 uses : ./
5959 with :
60- report-path : ${{ github.workspace }}/__tests__/resource/lint-results.xml
60+ report-path :
61+ ${{ github.workspace }}/__tests__/resource/lint-results.xml
6162 continue-on-error : true
Original file line number Diff line number Diff line change 22
33# GitHub Action for Android Lint
44
5- This Action generates annotations from [ Android Lint] ( https://developer.android.com/studio/write/lint ) Report XML.
5+ This Action generates annotations from
6+ [ Android Lint] ( https://developer.android.com/studio/write/lint ) Report XML.
67
78## Usage
89
9- An example workflow(.github/workflows/android-lint.yml) to executing Android Lint follows:
10+ An example workflow(.github/workflows/android-lint.yml) to executing Android
11+ Lint follows:
1012
1113``` yml
1214name : AndroidLint
4850
4951## References
5052
51- - Generated from [actions/typescript-action](https://github.com/actions/typescript-action) as template.
52- - This refer to [mobileposse/github-android-lint-action](https://github.com/mobileposse/github-android-lint-action).
53+ - Generated from
54+ [actions/typescript-action](https://github.com/actions/typescript-action) as
55+ template.
56+ - This refer to
57+ [mobileposse/github-android-lint-action](https://github.com/mobileposse/github-android-lint-action).
5358
5459## License
5560
56- action-android-lint is available under the MIT license. See [the LICENSE file](./LICENSE) for more info.
61+ action-android-lint is available under the MIT license. See
62+ [the LICENSE file](./LICENSE) for more info.
Original file line number Diff line number Diff line change 1- import { expect } from '@jest/globals'
2- import { Annotation } from '../src/annotation.js'
1+ import { expect } from '@jest/globals'
2+ import { Annotation } from '../src/annotation.js'
33
44describe ( 'annotation.ts' , ( ) => {
55 it ( 'test Annotation.constructor with Warning' , ( ) => {
Original file line number Diff line number Diff line change 11import { jest } from '@jest/globals'
22import * as path from 'path'
33import { fileURLToPath } from 'url'
4- import { expect } from '@jest/globals'
4+ import { expect } from '@jest/globals'
55import * as core from '../__fixtures__/core.js'
66
77jest . unstable_mockModule ( '@actions/core' , ( ) => core )
@@ -40,7 +40,10 @@ describe('main.ts', () => {
4040 } )
4141
4242 await run ( )
43- expect ( core . setFailed ) . toHaveBeenNthCalledWith ( 1 , 'Android Lint with 1 error' )
43+ expect ( core . setFailed ) . toHaveBeenNthCalledWith (
44+ 1 ,
45+ 'Android Lint with 1 error'
46+ )
4447 } )
4548
4649 it ( 'test runs without error' , async ( ) => {
Original file line number Diff line number Diff line change 11import path from 'path'
22import { fileURLToPath } from 'url'
3- import { expect } from '@jest/globals'
4- import { Annotation } from '../src/annotation.js'
5- import { parseXmls , parseXml } from '../src/parser.js'
3+ import { expect } from '@jest/globals'
4+ import { Annotation } from '../src/annotation.js'
5+ import { parseXmls , parseXml } from '../src/parser.js'
66
77describe ( 'parser.ts' , ( ) => {
88 const __dirname = path . dirname ( fileURLToPath ( import . meta. url ) )
Original file line number Diff line number Diff line change @@ -8,7 +8,9 @@ branding:
88
99inputs :
1010 report-path :
11- description : The lint report file path. Support glob patterns. e.g `build/reports/*.xml`
11+ description :
12+ The lint report file path. Support glob patterns. e.g
13+ ` build/reports/*.xml`
1214 required : true
1315 follow-symbolic-links :
1416 description : Indicates whether to follow symbolic links
Original file line number Diff line number Diff line change 1- import { AnnotationProperties } from '@actions/core'
2- import { AnnotationSeverityLevel } from './annotation-severity-level.js'
1+ import { AnnotationProperties } from '@actions/core'
2+ import { AnnotationSeverityLevel } from './annotation-severity-level.js'
33
44export class Annotation {
55 severityLevel : AnnotationSeverityLevel
Original file line number Diff line number Diff line change 11import * as core from '@actions/core'
2- import { Annotation } from './annotation.js'
2+ import { Annotation } from './annotation.js'
33
44export const echoMessages = ( annotations : Annotation [ ] ) : void => {
55 for ( const annotation of annotations ) {
Original file line number Diff line number Diff line change 11import * as core from '@actions/core'
22import * as glob from '@actions/glob'
3- import { echoMessages } from './command.js'
4- import { parseXmls } from './parser.js'
3+ import { echoMessages } from './command.js'
4+ import { parseXmls } from './parser.js'
55
66export async function run ( ) : Promise < void > {
77 try {
8- const reportPath = core . getInput ( 'report-path' , { required : true } )
8+ const reportPath = core . getInput ( 'report-path' , { required : true } )
99 const globOptions = {
1010 followSymbolicLinks : core . getBooleanInput ( 'follow-symbolic-links' )
1111 }
@@ -18,7 +18,7 @@ export async function run(): Promise<void> {
1818
1919 echoMessages ( annotations )
2020
21- const errors = annotations . filter ( annotation => {
21+ const errors = annotations . filter ( ( annotation ) => {
2222 return annotation . severityLevel === 'error'
2323 } )
2424 if ( errors . length ) {
You can’t perform that action at this time.
0 commit comments