3 ms·
Speaking of commit history, bad merges can leave comments and code together that shouldn’t be. And it will pass tests.
by sroussey 4y ago
Speaking of commit history, bad merges can leave comments and code together that shouldn’t be. And it will pass tests.
- layer8 4y agoBad merges can also leave code and code together that shouldn’t be, even if it passes tests. Always check your merges.
- sdenton4 4y agoCuriously this seems like exactly the story of thing that code ML should be able to identify and flag. 'Hey, the comment says this, but the code is doing something totally different.'
- bluocms 4y agoThen the comment can be removed, as is duplicate of code and has no use.
- nextaccountic 4y agoHowever, it might be trained on code with erroneous comments, either because it was mangled by a merge or because it's outdated. The more times this happen, the more confused the AI model will be. Which makes me to think that the AI models should be trained on the code evolution of commit chains and not just on isolated snippets of code. That way, the AI could analyze your own commits to detect when a comment becomes outdated.
- ilyt 4y agoI'd settle for AST-aware merge. That also fixes comments not glued to code they were attached to before