[PATCH] Added option to clang-format-diff.py to just output diff without changing files.

Alexander Kornienko alexfh at google.com
Fri Oct 4 13:24:00 PDT 2013

  > Why "-n" is there precedence in other tools? Otherwise, how about a named parameter? Maybe --dry_run?

  AFAIU, "-n" is used for "dry run" quite widely (https://www.google.com/search?q=%22n%22+%22dry_run%22). Among well-known tools are Perforce and CVS.

  We can use "--dry_run", of course, but the name doesn't say, that it also makes the tool display diff. Maybe "--show" or something similar?

  > Or maybe two parameters "--dry_run" (do not apply changes) and "-v" (display diffs)?

  I'm not sure anyone will ever need these options separately. Do you see how this could be used?


More information about the cfe-commits mailing list