MegaLinter component
Runs MegaLinter through the official container entrypoint and publishes the megalinter-reports folder as a job artifact.
include:
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/common@stable
- component: $CI_SERVER_FQDN/xrow-public/ci-tools/megalinter@stable
inputs:
stage: lint
validate-all-codebase: false
Inputs
name: job name. Defaults tomegalinter.stage: job stage. Defaults tolint.image: pinned MegaLinter image. Defaults toghcr.io/oxsecurity/megalinter:v9.4.0.path: directory to scan. Defaults to$CI_PROJECT_DIR.validate-all-codebase: setVALIDATE_ALL_CODEBASEfor MegaLinter. Defaults tofalse.disable-errors: setDISABLE_ERRORSfor report-only runs. Defaults tofalse.allow-failure: GitLaballow_failure. Defaults tofalse.parallel-process-number: limits MegaLinter parallelism viaPARALLEL_PROCESS_NUMBER. Defaults to4.needs,tags,rules: standard GitLab job controls.
Inputs
| Name | Description | Default | Type |
| --- | --- | --- | --- |
| allow-failure | Should the pipeline continue if MegaLinter fails? | false | boolean |
| disable-errors | Keep the job green while still publishing reports. | false | boolean |
| image | Pinned MegaLinter image to run. | ghcr.io/oxsecurity/megalinter:v9.4.0 | string |
| name | Name for the MegaLinter job. | megalinter | string |
| needs | The jobs that this job depends on. | [] | array |
| parallel-process-number | Maximum number of linters MegaLinter may run in parallel. | 4 | number |
| path | Path MegaLinter should scan. | $CI_PROJECT_DIR | string |
| rules | The rules that control when the MegaLinter job runs. | [{"if":"$CI_PIPELINE_SOURCE == \"schedule\"","when":"never"},{"if":"$CI_PIPELINE_SOURCE == \"merge_request_event\"","when":"on_success"},{"when":"on_success"}] | array |
| stage | The pipeline stage that the job belongs to. | lint | string |
| tags | The runners that this job depends on. | [] | array |
| validate-all-codebase | Validate the full codebase instead of only changed files. | false | boolean |