[ https://issues.apache.org/jira/browse/RAT-332?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17898965#comment-17898965 ]
Claude Warren commented on RAT-332: ----------------------------------- A couple of simple solutions are: * Create a directory where the new files are written ("_new_<UUID>" perhaps) and create all the files in there. This way new files are created in a uniquely named directory and will not be overwritten by later runs. * Add a "generated file tag" (something like "license header inserted by Rat <version>") as a comment so that later runs will ignore the file. > --force can cause system error > ------------------------------ > > Key: RAT-332 > URL: https://issues.apache.org/jira/browse/RAT-332 > Project: Apache Rat > Issue Type: Improvement > Affects Versions: 0.16 > Reporter: Claude Warren > Priority: Minor > Fix For: 0.17 > > > If an add license run is executed without the --force then a set of *.new > files are created. > If the same command is run again with the "–force" option the system will > overwrite the old .new file and then move it to the "*" file name, later the > system will look for the *.new to modify. > > For example: > First run > foo.md creates foo.md.new > > second run: > foo.md overwrites foo.md.new and then moves foo.md.new to foo.md > foo.md.new is now missing and the system errors and stops. > > System should remove foo.md.new from the list of files to process when foo.md > is processed under a --force flag. -- This message was sent by Atlassian Jira (v8.20.10#820010)