MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / _parseOutputLine

Function _parseOutputLine

lib/utils.ts:133–145  ·  view source on GitHub ↗
(line: string, inputFilename?: string, pathPrefix?: string)

Source from the content-addressed store, hash-verified

131}
132
133function _parseOutputLine(line: string, inputFilename?: string, pathPrefix?: string) {
134 line = line.split('<stdin>').join('<source>');
135 if (pathPrefix) line = line.replace(pathPrefix, '');
136 if (inputFilename) {
137 line = line.split(inputFilename).join('<source>');
138
139 if (inputFilename.indexOf('./') === 0) {
140 line = line.split('/home/ubuntu/' + inputFilename.substring(2)).join('<source>');
141 line = line.split('/home/ce/' + inputFilename.substring(2)).join('<source>');
142 }
143 }
144 return line;
145}
146
147function parseSeverity(message: string): number {
148 if (message.startsWith('warning')) return 2;

Callers 2

parseOutputFunction · 0.85
parseRustOutputFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected