← Notes

Never Hand an Auto-Fixer a Directory

1 min read#Tooling

I meant to clean one file I had touched; six test files I never opened were rewritten along with it.

I had changed one file and wanted a checker with auto-fix to clean it up, but passed it the whole directory. It rewrote six other test files in that directory that I had never opened.

Restoring them meant going one by one: git show HEAD:<path> > <path>. Since then, any tool with auto-fix only gets the paths of the files I actually changed.

Written byShihao Qi