3 ms·
I did this about a month ago with a php project; I use a php parser go present pieces of code automatically to chatgpt, ask what’s wrong with it (mostly securit
by tluyben2 4y ago
I did this about a month ago with a php project; I use a php parser go present pieces of code automatically to chatgpt, ask what’s wrong with it (mostly security issues in this case, but also some bugs) and one specific code snippet per response (which it wraps with back ticks in md format) which code remedy it. I automatically add the ‘fix’ and comment out the original. It does it all automatically via an unofficial chatgpt api. The end result is a pdf with all comments and suggested fixes and a ‘fixed’ codebase. The fixed codebase doesn’t work after, however, it takes little work to get it working.
It works well; you still need coding skills and carefully review the fixes (this codebase had 0 test coverage). However, you can see this really helps teams that have issues doing this themselves; at least showing what’s wrong and how to fix it, per case instead of general remarks which are often not followed up (enough).