Hacker News new | ask | show | jobs
by simonw 605 days ago
"Has anyone ever written something that detects changes to a method/function, and then when you save your file it pops up asking if related docs need updating?"

I've got a partial solution to that: I have automated tests that introspect my code for things that need documentation and then fail if those items aren't at least mentioned in the docs. Works really well.

I wrote about that here: https://simonwillison.net/2018/Jul/28/documentation-unit-tes...

1 comments

That's a good way to do it. I was actually thinking of a Git hook or something in the ci pipeline as a place to start. So reading about how you implemented it was helpful. Thanks for sharing!