jsdoc-scribe API/lib/qualityCurrent
Functions(10)
#loadCodeMultivitals
line 28
Lazily require code-multivitals. Throws a clear, actionable Error (never a raw MODULE_NOT_FOUND stack trace) if it isn't installed.
Returns: object — the code-multivitals module exports.
Signature
loadCodeMultivitals(): any
#resolveThresholds
line 53
Resolve the effective threshold set for a run: CLI/explicit thresholds > config file > named profile > code-multivitals's own built-in defaults. Mirrors code-multivitals's own documented priority order.
ParameterTypeOptionalDescription
cmobject- loadCodeMultivitals() result.
options{profile?: string, configPath?: string, thresholds?: object}
Returns: object|undefined — a thresholds object, or undefined to let code-multivitals use its own default.
Signature
resolveThresholds(cm: any, options: any): any
#runQuality
line 86
Run code-multivitals's analysis across `files`.
ParameterTypeOptionalDescription
filesstring[]
options{profile?: string, configPath?: string, thresholds?: object, minDuplicateLines?: number}yes
Returns: object — code-multivitals's AnalysisResult.
Signature
runQuality(files: any, options: any): any
#renderQualityReport
line 105
Render an AnalysisResult using one of code-multivitals's own reporters.
ParameterTypeOptionalDescription
resultobject- runQuality() output.
reporterNamestring- one of REPORTER_NAMES.
extra{outputDir?: string}yes- reporter-specific extras (badge needs an output dir).
Returns: string|void — report output (reporters that print directly, e.g. console, return undefined).
Signature
renderQualityReport(result: any, reporterName: any, extra: any): any
#saveQualitySnapshot
line 129
Snapshot/trend/hotspot passthroughs -- thin re-exports behind the same dynamic-require guard as everything else in this module.
ParameterTypeOptionalDescription
dirany
resultany
Returns: any
Signature
saveQualitySnapshot(dir: any, result: any): any
#loadQualitySnapshots
line 133
ParameterTypeOptionalDescription
dirany
limitany
Returns: any
Signature
loadQualitySnapshots(dir: any, limit: any): any
#computeQualityTrends
line 137
ParameterTypeOptionalDescription
snapshotsany
Returns: any
Signature
computeQualityTrends(snapshots: any): any
#rankQualityHotspots
line 141
ParameterTypeOptionalDescription
trendsany
churnMapany
limitany
Returns: any
Signature
rankQualityHotspots(trends: any, churnMap: any, limit: any): any
#getQualityChurnMap
line 145
ParameterTypeOptionalDescription
filesany
Returns: any
Signature
getQualityChurnMap(files: any): any
#applyQualityBaseline
line 158
Baseline/diff passthrough. code-multivitals has no dedicated "save baseline" function of its own (per its README, a baseline is just the raw analyse() result, JSON-serialized) -- applyBaseline is the one real API entry point, used to diff a fresh result against a previously-saved one.
ParameterTypeOptionalDescription
resultobject- fresh runQuality() output.
baselineobject- a previously-saved runQuality() output.
Returns: object — the diffed result (new/worsened findings only).
Signature
applyQualityBaseline(result: any, baseline: any): any
Variables & Constants(13)
const fs: any
const
lib/quality.js ---------------------------------------- Shared code-multivitals wrapper, used by BOTH: - bin/gen-dashboard.js (Track B, internal dashboard -- code-multivitals is a devDependency here, so require() always resolves in this repo) - bin/gen-docs.js's --quality* flags (Track C, end-user-facing -- code-multivitals is an OPTIONAL peerDependency there, so require() may legitimately fail in a user's project) Because of Track C, code-multivitals is NEVER require()'d at module top-level anywhere in this file (or anywhere else in lib/ or bin/) -- only inside loadCodeMultivitals(), called lazily at the point of use. See docs/backlog/adr-phase-j-project-dashboard.md Decision 10.
Signature
const fs: any
#INSTALL_MESSAGE
line 21
const INSTALL_MESSAGE: string
const
Signature
const INSTALL_MESSAGE: string
#wrapped
line 37
const wrapped: Error
const
Signature
const wrapped: Error
const opts: any
const
Signature
const opts: any
#thresholds
line 55
let thresholds: any
var
Signature
let thresholds: any
#profile
line 58
const profile: any
const
Signature
const profile: any
#fileThresholds
line 64
let fileThresholds: any
var
Signature
let fileThresholds: any
const cm: any
const
Signature
const cm: any
const opts: any
const
Signature
const opts: any
#thresholds
line 89
const thresholds: any
const
Signature
const thresholds: any
#analyseOptions
line 90
const analyseOptions: Object
const
Signature
const analyseOptions: Object
#REPORTER_NAMES
line 96
const REPORTER_NAMES: Array
const
Signature
const REPORTER_NAMES: Array
const cm: any
const
Signature
const cm: any