2 ms·
>Getting all your teammates to quit giving all their tests names like "testTheThing" is darn near impossible. Sometimes people are pretty bad a coming up new n
by nzach 2y ago
>Getting all your teammates to quit giving all their tests names like "testTheThing" is darn near impossible.
Sometimes people are pretty bad a coming up new names, but selecting a good name given some options generally isn't a big problem. So maybe we should create a kind o LLM linter for this situation ?
The prompt could be along the lines:
"Given this function: <FUNCTION>
This unit test: <UNIT TEST>
And these naming considerations: <NAMING GUIDE>
Is the current test name a good option?
What would be some better options?"
I did some quick testing and it seems work to reasonably well. It doesn't create anything mind-blowing but at least it seems to provide some consistent options.
- nzach 2y agoHere is a really bad POC for golang tests, if anyone is interested: https://github.com/nzachow/lmlinter https://github.com/nzachow/lmlinter Right now it just prints the prompt in the terminal.