speced / bikeshed

:bike: A preprocessor for anyone writing specifications that converts source files into actual specs.

Home Page:https://speced.github.io/bikeshed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build in a TODO warning

tabatkins opened this issue · comments

When you're creating a spec template for others to fill in, you often want to provide several bits of content and metadata that are desirable in the final spec, but require the actual spec author to fill in some data, like the repo name or the WPT path or what-have-you. It's common to designate this by using a "TODO" or similar in the content, which is reasonably easy to spot, but from long experience I know that it's still quite easy to accidentally leave one or more behind in what is otherwise a "finished" spec.

It might be useful to have some recognized syntax for designating a TODO fill-in spot, so Bikeshed can emit a warning (with line numbers, even!) telling you there's still something to fill in. Maybe the easiest would be a [TODO] macro? Short and easy to type, easy to spot visually, and with the new macro parsing that's about to land on main, very easy to intercept and emit a good error message for.

/cc @jyasskin

And to keep the template passing its build, we can leave Die On: error and include a [TODO]: Change Die On to warning.

Tab also suggested a new diagnostic level below warning to hold this sort of thing, but with my [TODO] hack above, I don't think it's necessary.