[PATCH] D77227: [RFC][FileCheck] Require colon immediately after CHECK directives
Jonathan Roelofs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 15:45:51 PDT 2020
jroelofs added a comment.
In D77227#1955799 <https://reviews.llvm.org/D77227#1955799>, @jdenny wrote:
> In D77227#1955767 <https://reviews.llvm.org/D77227#1955767>, @jroelofs wrote:
>
> > but is also missing the colon?
>
>
> That still bugs me because prefixes mentioned in English sentences in comments can easily wrap to the start of a comment line.
If forced to pick between rewriting such comments in those one-off [1] cases vs catching this class of bugs, I would probably lean toward the latter.
1: that those cases are infrequent compared to the general case of this bug is an assumption I need to validate.
> I still say complex diagnostics like that one should be opt-in, perhaps via a separate script. Besides, it's probably easier to build arbitrary, user-configurable heuristics in python than in C++ within FileCheck.
I'd like to steer away from making these things super configurable, since that will lead to different test suites having different assumptions, and likely steepen the learning curve for working on said tests. If there's some rule we could arrive at that catches the vast majority of problematic cases, without disturbing too many false positive comments, I think it should be applied as universally as possible across the whole codebase.
That said, I think we should decide what rules to validate before deciding what tool should validate them.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77227/new/
https://reviews.llvm.org/D77227
More information about the llvm-commits
mailing list