{"record":{"id":"8bbb9db87e9b6167","repo":"denoland/deno","slug":"found-documentation-lint-error","errorCode":null,"errorMessage":"Found {} documentation lint error{}.","messagePattern":"Found (.+?) documentation lint error(.+?)\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cli/tools/doc.rs","lineNumber":752,"sourceCode":"      .entry(diagnostic.location.filename.clone())\n      .or_insert_with(BTreeMap::new)\n      .entry(diagnostic.location.line)\n      .or_insert_with(BTreeMap::new)\n      .entry(diagnostic.location.col)\n      .or_insert_with(Vec::new)\n      .push(diagnostic);\n  }\n\n  for (_, diagnostics_by_lc) in diagnostic_groups {\n    for (_, diagnostics_by_col) in diagnostics_by_lc {\n      for (_, diagnostics) in diagnostics_by_col {\n        for diagnostic in diagnostics {\n          log::error!(\"{}\\n\", DisplayDocDiagnostic(diagnostic).display());\n        }\n      }\n    }\n  }\n  bail!(\n    \"Found {} documentation lint error{}.\",\n    colors::bold(diagnostics.len().to_string()),\n    if diagnostics.len() == 1 { \"\" } else { \"s\" }\n  );\n}\n","sourceCodeStart":734,"sourceCodeEnd":758,"githubUrl":"https://github.com/denoland/deno/blob/f7822238cab635a3a19f99f493f675fa81a7f9d8/cli/tools/doc.rs#L734-L758","documentation":"`deno doc --lint` collects documentation diagnostics (e.g. missing JSDoc on exported symbols, broken doc references), prints each one in full via DisplayDocDiagnostic above the summary, then bails with the total count (singular/pluralized). The bail itself is just the failure summary — the actionable detail is in the per-diagnostic output preceding it.","triggerScenarios":"Running `deno doc --lint` over a codebase where exported symbols lack the required JSDoc, or doc comments contain broken references. Every diagnostic found across all files increments the reported count.","commonSituations":"Enabling doc lint on an existing codebase for the first time; CI gates that run `deno doc --lint`; new exports added without JSDoc in repos where the lint is enforced.","solutions":["Read each printed diagnostic above the summary — it gives file, line, and what's missing.","Add the required JSDoc (description and any demanded tags) to each flagged export.","Fix or remove broken {@link}/reference targets in doc comments.","Re-run until the count reaches zero before pushing."],"exampleFix":"// before\nexport function add(a: number, b: number): number {\n  return a + b;\n}\n\n// after\n/** Adds two numbers. */\nexport function add(a: number, b: number): number {\n  return a + b;\n}","handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"# CI: capture diagnostics, fail with context\nif ! deno doc --lint src/ > doclint.log 2>&1; then\n  echo \"doc lint failed:\"; grep -c 'lint error' doclint.log || true\n  cat doclint.log\n  exit 1\nfi","preventionTips":["Run `deno doc --lint` locally on changed modules before pushing; keep the count at zero as a habit.","Write JSDoc at export time rather than retro-fitting before releases.","Gate PRs on doc lint so the error count never accumulates into the hundreds."],"tags":["deno-doc","lint","jsdoc","documentation","ci"],"backgroundTag":"documentation-lint-violations","analyzedSha":"f7822238cab635a3a19f99f493f675fa81a7f9d8","analyzedAt":"2026-08-20T13:07:44.778Z","contentChangedAt":"2026-08-20T13:07:44.778Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}