Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Maybe it could be opt out when compiling. Error message could be `todo has been expired, failing compilation. To ignore this, use -DIGNORE_TODO`


https://github.com/davidpdrsn/todo-or-die/blob/main/src/lib....

    //! # Skipping checks  
    //!   
    //! If the environment variable `TODO_OR_DIE_SKIP` is set all macros will do nothing and
    //! immediately succeed. This can for example be used to skip checks locally and only perform them
    //! on CI.


This makes me think a nicer (and simpler) implementation could be just special comments that have a shell command in them. Then your ci script recursive greps for commands, and runs them. That way you get enforcement in ci, not for devs, and also a super simple system with no complex compiler magic. Bonus point: it will work in any language.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: