I wish to automatically have backups created via the default suffix-adding behavior (ending with .orig or anything else). However, since I can neither use wildcards in the --exclude= option nor specify a separate directory to save the backups to (which would allow me to --exclude= that directory), subsequent runs of astyle format all .cpp.orig* files it finds, and I end up with a new nested .cpp.orig.orig.orig... file every time I run this. I've set it to run as an external tool via macro and my .astylerc in CLion every time I save my project, but the backups get out of control. I would be happy with the ability to use wildcards in my --exclude= options, an option to specify a backup subdirectory, updating the tool to automatically skip formatting any file ending with the --suffix= option (or default .orig if not set), or any other workaround on my end you suggest that will let me maintain the automation, have backups made, and not drown in .cpp.orig.orig.orig.orig.orig.orig... files...
Thanks!
Hi, you can prevent this by defining a wildcard which only matches your input files. I assume you apply just * as file pattern?
Yeah, I've just been using
*...I guess I was hoping to put any config settings in the dotfile instead of having to keep track of custom arguments buried in my IDE settings (portability regardless of tool blah blah blah), but if it's too corner-case to implement, I get it! Despite having access to fancy-ol' CLion for the time being, they don't support automatic banner-style formatting, so...will do what I have to :).It should not be an issue to add an exclude pattern as well. I will look into it in a few days.
Files with backup suffix will be ignored in the next release.
Fixed in 3.4.15