[cfe-dev] Configure clang-format to traverse subdirectories?

achartier at fastmail.fm achartier at fastmail.fm
Thu Jun 12 20:22:27 PDT 2014


Ok, I can certainly wrap it in a find call. I just thought my use case
would be fairly common (I've come across some other posts online trying
to do something similar) and that, being a common use case, it may make
sense to support it well from within the tool itself rather than
requiring the user to come up with a solution of their own.





On Wed, Jun 11, 2014, at 08:30 PM, Daniel Jasper wrote:

I think that this is basic shell functionality which should not be
replicated in each tool. E.g. in most linux shells, just do:

find | xargs clang-format -i



On Thu, Jun 12, 2014 at 3:27 AM, <[1]achartier at fastmail.fm> wrote:

Hello,



I would like to run clang-format on a large codebase. I noticed that
you

can use wildcards to specify input files to clang-format, however these

wildcards seem to only pick up files in the current directory and not

subdirectories. Is there a way to specify a recursive search with a

wildcard (similar to Artistic Style's --recursive option:

[2]http://astyle.sourceforge.net/astyle.html#_recursive)? Perhaps using
a

special wildcard syntax I'm not aware of?



If this isn't currently a feature, what's the likelihood it could make

it in the upcoming release? I have found Artistic Style's --recursive

and --exclude options quite powerful and useful and would love to see

similar functionality in clang-format.



Thanks!

_______________________________________________

cfe-dev mailing list

[3]cfe-dev at cs.uiuc.edu

[4]http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

References

1. mailto:achartier at fastmail.fm
2. http://astyle.sourceforge.net/astyle.html#_recursive
3. mailto:cfe-dev at cs.uiuc.edu
4. http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20140612/6557bed4/attachment.html>


More information about the cfe-dev mailing list