Discussion

Sign in or Join to comment or subscribe

2021-09-27T07:29:40Z ago

I was inspired by the Rust/Ruby libraries and I created one for credo in Elixir: https://hex.pm/packages/credo_todo_or_die

Features:

  • Supports any tags you want (TODO, FIXME, etc…) and lets you configure priorities (which is just a credo feature)
  • Lets you trigger a tag in the future based on date/time
  • Lets you trigger a tag in the future based on an application dependency version
  • Lets you trigger a tag in the future if a GitHub issue / PR has been closed
Klemen Sever

Klemen Sever

Paris, France

Dev from @42born2code, working at @dailymotion, Osteopath, Founder of @temporar_io, @kwelo_com & other stuff.

2021-09-27T16:40:06Z ago

Excellent ! I was also thinking of creating one for elixir as a macro that would trigger at compile time and make if fail if necessary. I’ll definitely look into your credo based plugin 🤩

2021-09-28T07:18:14Z ago

👍 Let me know if you have any thoughts on what it could do!

I talked with a couple of other people on the Elixir Slack about it when I started and we all liked the idea of doing it as a check (like with credo) as opposed to at runtime because that could fail on production (not very with the “stability” Elixir ethos 😅). Compile time would be better, but if you wanted to implement something like the check of GitHub issues then you’re adding HTTP requests to your application’s compile, which maybe means that you’re app doesn’t compile if the HTTP request fails (like because GitHub is down, even if the issue isn’t closed yet).

But it’s somewhat less flexible too because you can’t implement just any code. Though… the credo_todo_or_die library is implementing a custom credo “check”. credo_todo_or_die is implemented under the covers in a modular fashion to have the different checks, so I suppose it could be possible to allow somebody to implement their own custom credo_todo_or_die alerts. 🤔

2021-10-03T08:57:42Z ago

Just like cheerfulstoic we were inspired by this and created a TypeScript Language Server plugin!

It’s available here on npm:
https://www.npmjs.com/package/typescript-todo-or-die-plugin

For now, it has a minimal feature set, because this was created in a day during our company’s Innovation Day:

  • Supports only TODO
  • Let’s you show an error message in your editor based on a date
  • Let’s you show a warning message in your editor when a date is coming up

We have lot’s of ideas to extend the project, for example:

  • Include a CLI tool that can lint and browse todo comments
  • Add intellisense to help people autocomplete the todo functions
0:00 / 0:00