GitLab Code Quality #
Bring LintLang findings into merge request reviews with source locations, severity, and suggested actions. Unchanged findings stay matched when unrelated lines move, helping reviewers focus on new and resolved issues.
Setup #
Use a GitLab project with CI/CD enabled and Git available locally. Open a terminal in an empty scratch directory and fetch the released CI example:
git clone --depth 1 --branch v0.8.0 https://github.com/hermes-labs-ai/lintlang.git lintlang-integration-source
cd lintlang-integration-source
Open examples/gitlab-code-quality.yml in this checkout and merge its job into .gitlab-ci.yml in your own project, preserving existing jobs. You can also read the released CI job online. Replace AGENTS.md with the files or directories you want to check.
The example installs LintLang 0.8.0 and runs on merge requests and the default branch. Run the default-branch pipeline first so GitLab has a comparison report. Its artifacts:reports:codequality setting publishes the report to GitLab.
Verify #
With the CLI installed, return to your own project's repository root and reproduce the report locally:
lintlang scan AGENTS.md --format gitlab --fail-on fail > gl-code-quality-report.json
Use the same inputs for Code Quality and the example's full JSON report. Keep destinations outside scanned inputs: shell redirection overwrites its destination before scanning begins.
In the pipeline, inspect both the job outcome and its retained artifacts, then open a merge request's Code Quality findings. The local command creates the report; it does not upload it.
Choose your threshold #
The example blocks on HIGH and CRITICAL findings and preserves reports when the job fails. Use --fail-on review to include MEDIUM, or remove the threshold for advisory findings. Input errors and findings without a valid source location still cause a nonzero exit; the full JSON artifact retains scan details for troubleshooting.
Read findings #
| LintLang severity | GitLab severity |
|---|---|
| CRITICAL | blocker |
| HIGH | critical |
| MEDIUM | major |
| LOW | minor |
| INFO | info |
Specific text findings point to the resolved source line. Whole-prompt, tool, schema, or message findings point to the start of that construct. Transformed multiline values may also point to the enclosing value.
Next steps #
Adopt a baseline · Compare report formats · Released GitLab guide · All integrations