-
Notifications
You must be signed in to change notification settings - Fork 0
Baseline
Yuki edited this page Jul 13, 2026
·
2 revisions
Baselines let existing projects adopt the detector gradually.
npx i18n-smell-detector check \
--config i18n-smell.config.mjs \
--baseline .i18n-smell-baseline.json \
--update-baselinenpx i18n-smell-detector check \
--config i18n-smell.config.mjs \
--baseline .i18n-smell-baseline.jsonIssues found in the baseline are marked as ignored with reason baseline. New issues remain visible and can fail CI.
npx i18n-smell-detector check \
--config i18n-smell.config.mjs \
--baseline .i18n-smell-baseline.json \
--include-ignored{
"version": 3,
"issues": [
{
"id": "identical:zh:home.title",
"key": "home.title",
"targetLocale": "zh",
"value": "Welcome back"
},
{
"id": "placeholders:zh:user.greeting",
"key": "user.greeting",
"targetLocale": "zh",
"value": "你好"
},
{
"id": "hardcoded:v3:ba2ceaa5db551ba38603",
"file": "src/components/UserPanel.vue",
"line": 3,
"column": 9,
"value": "Account settings",
"contextHash": "031ada8157f7057f5d5e",
"relativeRange": { "start": 4, "end": 20 }
}
]
}- Updating a baseline writes current non-ignored findings.
- Stale baseline entries disappear when the baseline is updated.
- Version 3 hardcoded fingerprints use normalized message content, finding kind, AST context, and a source anchor.
- Absolute line, column, and file offsets are not part of v3 identity, so adding imports or blank lines does not invalidate entries.
- Version 1 and version 2 baseline files remain readable. Updating a baseline rewrites it as version 3.