codingame-cpp-merge
codingame-cpp-merge copied to clipboard
Remove output file before starting the merge Fixes #1
Fixes #1 This will prevent output cpp file from being included in itself. Instead of wiping the content of the file, I deleted the file. This could have been done with exclusion, but I think this is simple and fits well with the original approach.
I would prefer to enforce the name of the output file to not match the file list. So just check whether it is in an excluded folder, or has a special extension. We can just bail out with an error when this test fails.