canonical / praecepta

Creative Commons Attribution Share Alike 4.0 International
12 stars 20 forks source link

Rule15: Prompts in codeblocks #75

Closed izmalk closed 3 months ago

izmalk commented 3 months ago

Implement the Rule # 15: No prompts in code blocks

After multiple attempts to make it work with sophisticated RegEx (that matched every code block first) I've reduced the regex to detect the specific symbols used for CLI prompts used at the very beginning of a line.

That solution works great for its simple implementation: it gets the job done with no false positives detected so far.