Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
customTags: options.tags,
reporter: options.reporter,
withInlineFiles: options.withInlineFiles
});
todos = todos.concat(todo);
});
if (options.console) {
output = leasot.reporter(todos, { reporter: 'table', spacing: 2 });
if (options.relativeFilePath) {
output = relativePath(output);
}
console.log(output + "\n"); // eslint-disable-line
}
output = leasot.reporter(todos, { reporter: options.reporter, spacing: 2 });
if (output.length > 0) {
let outputFilename = options.filename || '';
if (outputFilename.length === 0) {
outputFilename =
options.reporter === 'markdown'
? 'TODO.md'
: 'todo.' + options.reporter;
if (options.reporter === 'table') {
outputFilename = 'todo.txt';
}
}
if (!options.suppressFileOutput) {
if (options.relativeFilePath) {
output = relativePath(output);
}
}
const todo = leasot.parse({
ext: path.extname(file),
content: fs.readFileSync(file, 'utf8'),
fileName: file,
customTags: options.tags,
reporter: options.reporter,
withInlineFiles: options.withInlineFiles
});
todos = todos.concat(todo);
});
if (options.console) {
output = leasot.reporter(todos, { reporter: 'table', spacing: 2 });
if (options.relativeFilePath) {
output = relativePath(output);
}
console.log(output + "\n"); // eslint-disable-line
}
output = leasot.reporter(todos, { reporter: options.reporter, spacing: 2 });
if (output.length > 0) {
let outputFilename = options.filename || '';
if (outputFilename.length === 0) {
outputFilename =
options.reporter === 'markdown'
? 'TODO.md'
: 'todo.' + options.reporter;
if (options.reporter === 'table') {