Developer builds emoji-blocking lint that halts automated site builds on violation
A developer managing roughly twenty automated static sites found that machine-generated content repeatedly introduced emoji despite a strict no-emoji style rule. To enforce the policy reliably, they built a custom linter that scans output files using a Unicode regex and exits with a non-zero code if any emoji is detected, halting the rest of the build pipeline. The tool reports findings as JSON with file names and line numbers, making violations easy to locate and fix. A silent bug initially caused the linter to scan zero files and falsely report success, which was traced to a mismatch between how file extensions were passed as arguments versus how they were compared internally. The fix involved normalising extension inputs to include a leading dot, and the developer noted that logging the number of files scanned would have exposed the empty-scan issue much sooner.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in