mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
commit
720ed71b54
25 changed files with 1544 additions and 1198 deletions
|
@ -57,10 +57,10 @@ async function main() {
|
|||
}
|
||||
|
||||
if (localErrors.length) {
|
||||
logger.info(`\n${chalk.underline(filepath)}`)
|
||||
console.log(`\n${chalk.underline(filepath)}`)
|
||||
localErrors.forEach(error => {
|
||||
const position = `${error.line}:${error.column}`
|
||||
logger.error(` ${chalk.gray(position.padEnd(4, ' '))} ${error.message.trim()}`)
|
||||
console.log(` ${chalk.gray(position.padEnd(4, ' '))} ${error.message.trim()}`)
|
||||
})
|
||||
|
||||
errors = errors.concat(localErrors)
|
||||
|
@ -68,7 +68,7 @@ async function main() {
|
|||
}
|
||||
|
||||
if (errors.length) {
|
||||
logger.error(chalk.red(`\n${errors.length} error(s)`))
|
||||
console.log(chalk.red(`\n${errors.length} error(s)`))
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ async function main() {
|
|||
}
|
||||
|
||||
if (errors.length) {
|
||||
logger.info(chalk.underline(filepath))
|
||||
console.log(chalk.underline(filepath))
|
||||
console.table(errors, ['type', 'lang', 'xmltv_id', 'site_id', 'name'])
|
||||
console.log()
|
||||
stats.files++
|
||||
|
@ -60,7 +60,7 @@ async function main() {
|
|||
}
|
||||
|
||||
if (stats.errors > 0) {
|
||||
logger.error(chalk.red(`${stats.errors} error(s) in ${stats.files} file(s)`))
|
||||
console.log(chalk.red(`${stats.errors} error(s) in ${stats.files} file(s)`))
|
||||
process.exit(1)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue