You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Compodoc always reports incorrect 0% coverage for some files #1728
OS: linux
Node: v24.15.0
npm: 11.12.1
Compodoc: v1.2.1
Compodoc installed globally or locally ?
Ran globally via npx @compodoc/compodoc -p tsconfig.json --coverageTest 80 --coverageMinimumPerFile 80 --coverageTestShowOnlyFailed -t
If possible sourcecode of the file where it breaks
/**
* @license
* @copyright
*/
/**
* Does the thing.
* @param a thing.
* @param b thing.
* @returns A thing.
*/
export function exampleFn(
a: string,
b: string,
): unknown {
return null;
}
If possible your terminal logs before the error
npx @compodoc/compodoc -p tsconfig.json --coverageTest 100 --coverageMinimumPerFile 100 --coverageTestShowOnlyFailed -t
npm warn Unknown env config "unsafe-perm". This will stop working in the next major version of npm. See npm help npmrc for supported config options.
Compodoc v1.2.1
[14:35:32] 0 % for file src/lib/utils/example.ts - exampleFn - under minimum per file
Motivation for or Use Case
Using Compodoc to ensure all functions/types have been documented.
Reproduce the error
run npx @compodoc/compodoc -p tsconfig.json --coverageTest 80 --coverageMinimumPerFile 80 --coverageTestShowOnlyFailed -t against the provided example file.
It seems Compodoc does not like the @license / @copyright header tags. Issue does not occur when header does not contain those tags, or if anything is imported after the header. Otherwise Compodoc always reports 0% coverage for that file.
Workarounds
A) Import anything after the header (can be a type import).
B) Don't include the license/copyright headers (probably not an option if you are using them)
Activity
feat(compiler): handle files with license headers
Tezra commentedon May 22, 2026
@vogloblinsky Thanks for fixing this so fast! Do you have any estimate of when the next release will go out?
vogloblinsky commentedon May 23, 2026
This weekend ;)