MCPcopy Create free account
hub / github.com/code-pushup/cli / formatSourceLine

Function formatSourceLine

packages/utils/src/lib/reports/formatting.ts:131–141  ·  view source on GitHub ↗
(
  position: SourceFileLocation['position'],
)

Source from the content-addressed store, hash-verified

129}
130
131export function formatSourceLine(
132 position: SourceFileLocation['position'],
133): string {
134 if (!position) {
135 return '';
136 }
137 const { startLine, endLine } = position;
138 return endLine && startLine !== endLine
139 ? `${startLine}-${endLine}`
140 : `${startLine}`;
141}
142
143export function formatGitHubLink(
144 file: string,

Callers 2

auditDetailsIssuesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected