diff --git a/.build/validate-icons.mjs b/.build/validate-icons.mjs index 748e0139e4..57ec4dc553 100644 --- a/.build/validate-icons.mjs +++ b/.build/validate-icons.mjs @@ -24,12 +24,12 @@ types.forEach(type => { const iconContent = fs.readFileSync(icon, 'utf-8') if (!iconContent.includes(iconTemplate(type))) { - console.log(`Icon ${icon} is not properly formatted\n`) + console.log(`Icon ${icon} is not properly formatted`) error = true } if (!iconContent.includes('')) { - console.log(`Icon ${icon} has no metadata\n`) + console.log(`Icon ${icon} has no metadata`) error = true } @@ -38,33 +38,33 @@ types.forEach(type => { if (data.unicode) { if (unicodes.indexOf(data.unicode) !== -1) { - console.log(`Icon ${icon} has duplicate unicode "${data.unicode}"\n`) + console.log(`Icon ${icon} has duplicate unicode "${data.unicode}"`) error = true } if (data.unicode.length !== 4) { - console.log(`Icon ${icon} has invalid unicode "${data.unicode}"\n`) + console.log(`Icon ${icon} has invalid unicode "${data.unicode}"`) error = true } // check duplicates in tags if (duplicateExists(data.tags || [])) { - console.log(`Icon ${icon} has duplicate tags\n`) + console.log(`Icon ${icon} has duplicate tags`) error = true } unicodes.push(data.unicode) } else if (argvs.hard) { - console.log(`Icon ${icon} has no unicode\n`) + console.log(`Icon ${icon} has no unicode`) error = true } if (argvs.hard && !data.version) { - console.log(`Icon ${icon} has no version\n`) + console.log(`Icon ${icon} has no version`) error = true } } catch (e) { - console.log(`Icon ${icon} has invalid metadata\n`) + console.log(`Icon ${icon} has invalid metadata`) error = true } }) @@ -81,7 +81,7 @@ types.forEach(type => { Object.entries(aliases).forEach(([type, replacers]) => { Object.entries(replacers).forEach(([icon, alias]) => { if (!fs.existsSync(join(ICONS_SRC_DIR, type, `${alias}.svg`))) { - console.log(`Alias ${icon} for ${alias} in ${type} doesn't exists\n`) + console.log(`Alias ${icon} for ${alias} in ${type} doesn't exists`) error = true } }) diff --git a/.github/workflows/validate-icons.yml b/.github/workflows/validate-icons.yml index 5f72819888..5da9d10411 100644 --- a/.github/workflows/validate-icons.yml +++ b/.github/workflows/validate-icons.yml @@ -40,7 +40,7 @@ jobs: - name: Validate icons id: validate - run: echo \`\`\``pnpm run --silent validate`\`\`\` >> ./comment-markup.md + run: pnpm run --silent validate >> ./comment-markup.md - name: Comment PR uses: thollander/actions-comment-pull-request@v2