File tree 1 file changed +5
-2
lines changed
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -17,19 +17,22 @@ export const exclude = [];
17
17
* @function
18
18
* @description Lint files.
19
19
* @param {string | Directory | undefined } src
20
+ * @param {string } version
20
21
* @returns {Directory | string }
21
22
*/
22
23
export async function lint (
23
- src : Directory | string
24
+ src : Directory | string ,
25
+ version : string = "v7"
24
26
) : Promise < Directory | string > {
25
27
const context = await getDirectory ( src ) ;
26
28
const ctr = dag
27
29
. pipeline ( Job . lint )
28
30
. container ( )
29
- . from ( " oxsecurity/megalinter:v7" )
31
+ . from ( ` oxsecurity/megalinter:${ version } ` )
30
32
. withDirectory ( "/app" , context )
31
33
. withEnvVariable ( "DEFAULT_WORKSPACE" , "/app" )
32
34
. withEnvVariable ( "REPORT_OUTPUT_FOLDER" , "megalinter-reports" )
35
+ . withEnvVariable ( "SARIF_REPORTER" , "true" )
33
36
. withWorkdir ( "/app" ) ;
34
37
35
38
await ctr . stdout ( ) ;
You can’t perform that action at this time.
0 commit comments