Menu ▾ ▴

#560 Unable to programmatically exclude backup copies

closed-fixed
None
2024-05-09
2024-02-13
Unwitch
No

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!

1 Attachments

Discussion

  • André Simon

    André Simon - 2024-02-14
    • status: open --> open-accepted
    • assigned_to: André Simon
     
  • André Simon

    André Simon - 2024-02-14

    Hi, you can prevent this by defining a wildcard which only matches your input files. I assume you apply just * as file pattern?

     
  • Unwitch

    Unwitch - 2024-02-16

    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 :).

     
  • André Simon

    André Simon - 2024-02-16

    It should not be an issue to add an exclude pattern as well. I will look into it in a few days.

     
  • André Simon

    André Simon - 2024-05-03

    Files with backup suffix will be ignored in the next release.

     
  • André Simon

    André Simon - 2024-05-09
    • status: open-accepted --> closed-fixed
     
  • André Simon

    André Simon - 2024-05-09

    Fixed in 3.4.15

     

Log in to post a comment.