-
-
Notifications
You must be signed in to change notification settings - Fork 832
Labels
A-linterArea - LinterArea - Linter
Description
What version of Oxlint are you using?
1.39.0
What command did you run?
oxlint --format gitlab
What does your .oxlintrc.json config file look like?
No .oxlintrc.json.
What happened?
The location.path in gitlab formatted output should be relative to the closest git repo root, not the CWD (see docs).
The file containing the code quality violation, expressed as a relative path in the repository. Do not prefix with ./.
Steps to reproduce:
# Create temp folder and git repo:
cd $(mktemp -d)
git init .
# Create subfolder and install oxlint:
mkdir pathFromRepoRoot && cd pathFromRepoRoot
yarn add -DE oxlint
# Create and lint example file:
echo "const unused = 2;" > example.js
yarn oxlint --format gitlabActual output:
[
{
"description": "Variable 'unused' is declared but never used. Unused variables should start with a '_'.",
"check_name": "eslint(no-unused-vars)",
"fingerprint": "92988ecf75890d1d",
"severity": "major",
"location": {
"path": "example.js",
"lines": {
"begin": 1,
"end": 1
}
}
}
]Expected output:
[
{
"description": "Variable 'unused' is declared but never used. Unused variables should start with a '_'.",
"check_name": "eslint(no-unused-vars)",
"fingerprint": "92988ecf75890d1d",
"severity": "major",
"location": {
"path": "pathFromRepoRoot/example.js",
"lines": {
"begin": 1,
"end": 1
}
}
}
]Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-linterArea - LinterArea - Linter