Skip to content

Commit 10f8fb8

Browse files
committed
[megalinter] enable SARIF_REPORTER
1 parent 67a7f64 commit 10f8fb8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

megalinter/src/dagger/jobs.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,22 @@ export const exclude = [];
1717
* @function
1818
* @description Lint files.
1919
* @param {string | Directory | undefined} src
20+
* @param {string} version
2021
* @returns {Directory | string}
2122
*/
2223
export async function lint(
23-
src: Directory | string
24+
src: Directory | string,
25+
version: string = "v7"
2426
): Promise<Directory | string> {
2527
const context = await getDirectory(src);
2628
const ctr = dag
2729
.pipeline(Job.lint)
2830
.container()
29-
.from("oxsecurity/megalinter:v7")
31+
.from(`oxsecurity/megalinter:${version}`)
3032
.withDirectory("/app", context)
3133
.withEnvVariable("DEFAULT_WORKSPACE", "/app")
3234
.withEnvVariable("REPORT_OUTPUT_FOLDER", "megalinter-reports")
35+
.withEnvVariable("SARIF_REPORTER", "true")
3336
.withWorkdir("/app");
3437

3538
await ctr.stdout();

0 commit comments

Comments
 (0)