3 const chalk = require("chalk");
4 const path = require("path");
6 function logFrom(fromValue) {
7 if (fromValue.charAt(0) === "<") return fromValue;
9 .relative(process.cwd(), fromValue)
14 module.exports = function(report) {
17 report.forEach(sourceReport => {
18 if (!sourceReport.ranges || sourceReport.ranges.length === 0) {
22 output += chalk.underline(logFrom(sourceReport.source)) + "\n";
23 sourceReport.ranges.forEach(range => {
24 output += `start: ${range.start}`;
25 if (range.end !== undefined) {
26 output += `, end: ${range.end}`;