Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add new "Atomic File Operations" rule
When file operations after confirming the existence check of a file, frequent parallel file operations may cause problems that are difficult to reproduce. Therefore, it is prefer to use atomic file operations. ```ruby # bad unless File.exist?(path) FileUtils.makedirs(path) end if File.exist?(path) FileUtils.remove(path) end # good FileUtils.mkdir_p(path) FileUtils.rm_rf(path) ```
- Loading branch information