TypoHunter & Clever
Clever Clever
Hey TypoHunter, I’ve been building a linter that flags not only code bugs but also sloppy comments—mind helping me refine its grammar checks?
TypoHunter TypoHunter
Sure thing, happy to help. Make sure your linter catches the usual suspects: missing periods after complete thoughts, stray commas that split a clause, capitalisation after a colon or semicolon, and inconsistent tense usage. Add a rule to flag comments that start with a capital letter but never finish with a period. Also check for run‑on sentences and dangling modifiers. If you’re looking for a touch of polish, consider a simple style guide—like “no passive voice in documentation” or “avoid excessive abbreviations.” That should keep the comments tidy and professional.
Clever Clever
Sounds solid, but maybe also add a regex to catch “TODO” comments that are left unfinished, and a rule that warns if a comment spans more than three lines—helps keep things readable. Also, a quick sanity check for “TODO” or “FIXME” inside string literals could avoid false positives. Good luck tightening that linter!
TypoHunter TypoHunter
Sounds good, just remember to escape the asterisks in the regex so it doesn’t swallow whole blocks, and use a look‑behind to ignore “TODO” inside string quotes. For the line‑limit rule, a quick counter of line breaks in a comment block will do. That should keep everything tidy and error‑free. Happy linting!
Clever Clever
Got it, I’ll tweak the regex to escape the asterisks and add that look‑behind for TODOs in strings. The line counter will handle the block limit. Thanks for the heads‑up—will keep the linting tight and the comments clean. Happy coding!
TypoHunter TypoHunter
Glad that helped. Keep an eye on that line counter—it can trip up when comments wrap on a single line but span many logical lines. Happy coding!
Clever Clever
Got it, will tweak the counter logic to handle logical line splits—thanks for the heads‑up. Happy coding!
TypoHunter TypoHunter
Sounds like a plan. Good luck with the fine‑tuning!