Eliminate the undocumented TODOs with todocheck
source link: https://pmihaylov.com/todocheck/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Yesterday, I released todocheck – a new kind of static code analyser for annotated TODOs.
Way too often, we let leftover TODOs slip into our main branch, which leaves your coworkers puzzles, looking at it a year from now.
They’re thinking – what did I mean by “TODO: Move this to the users package”? What is the users package? It doesn’t seem to exist anymore.
todocheck helps you fix this by forcing you to mark all your TODOs against an existing, open issue in your issue tracker.
That way, if you, at some point, close the issue, thinking you’re done, the CI pipeline will sparkle in red as there is an open, unaddressed TODO in your main branch.
No longer can developers close a half-baked issue, rushing for the weekly sprint review to say “I’m done!”.
How todocheck works
You run todocheck as a standalone binary from the root of your project and it looks for issues with the following format:
// TODO J123: Fix this typo func fuu() { ... }
In case the linked issue J123
is open, todocheck
will not report any error. In case you close the issue or it doesn’t exist, todocheck will show an error:
ERROR: Issue is closed. myproject/main.go:12: // TODO J123: Fix this typo ERROR: Issue doesn't exist. myproject/main.go:14: // TODO J321: A non-existent issue
If there is an unannotated TODO
in your code base, todocheck will also report it as a malformed TODO
:
ERROR: Malformed todo. myproject/main.go:16: // TODO - This is not a valid annotated todo
Only TODO
s with valid, open issues are allowed to exist in the codebase.
By integrating todocheck in your development workflow & CI pipeline, you can ensure that there will be no half-baked issue closed with pending TODO
s in the codebase.
Does todocheck work with my language?
You can see the list of supported programming languages here .
There is also support for various public & private issue trackers. See the list here .
But your favorite language/issue tracker is not in the list?
Then feel free to open an issue & describe your needs. Oftentimes, adding support for new languages/issue trackers is a matter of configuration, so you might see your tool in the above lists pretty soon. Here is an example of such a request.
Conclusion
If you want to learn more about included features & configurations, consult the project’s README .
Why don’t you give todocheck a try right now? Download the latest release & check out the Quickstart section to get started in no-time.
Like the project? Show some love by :star:-ing it on GitHub .
Recommend
-
20
One of my life’s traumas is the bug trackers, the issue trackers, the project management tools. The toolset that completes the version control log to form the development equivalent of
-
10
todocheck todocheck is a static code analyzer for annotated TODO comments. It let's you create actionable TODOs by annotating them with issues from any of the
-
7
Smarter ToDos with Kotlin ➚ Kaushik Gopal Checkout this quick blog post I wrote for my company, tweakin...
-
5
Produzindo um avião com métodos ágeis [caption id=”attachment_19” align=”alignleft” width=”225” caption=”Produto final produzido no curso de CSM”]
-
11
Bienvenido a la 11va edición de Mateando con DeFi 🧉, en este newsletter vamos a estar hablando un poco mas sobre Yearn y los cambios que se vienen en su protocolo con los Vaults V2.Lo mas interesante de la semana:...
-
5
-
3
4 Ways Software Engineers Organize Their TODOsMay 27th 2021 417 reads4
-
13
Product Information
-
10
Smarter ToDos with Kotlin »Kaushik GopalCheckout this quick blog post I wrote for my company, tweaking the existing Kotlin TODO to work towards...
-
3
todo-or-die todo-or-die provides procedural macros that act as checked reminders. Examples // trigger a compile error if we're past a certain date todo_or_die::after_date!(3000, 1, 1); // its the y...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK