INNER CODE UNIT · TypeScript
parseAndReportFiles
pgilad/leasot · src/cli/cli.ts:50
const parseAndReportFiles = (fileGlobs: string[], options: ProgramArgs): void => {
// Get all files and their resolved globs
const files = globbySync(fileGlobs, {
ignore: options.ignore || [],
});
if (!files || !files.length) {
console.log(logSymbols.warning, 'No files found for parsing');
process.exit(1);
}
// Parallel read all the given files
mapLimit(
files,
CONCURRENCY_LIMIT,
(file, cb) => fs.readFile(path.resolve(process.cwd(), file), 'utf8', cb),
async (err, results: string[]) => {
if (err) {