File: format.pl

package info (click to toggle)
dmrgpp 6.06-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 113,900 kB
  • sloc: cpp: 80,986; perl: 14,772; ansic: 2,923; makefile: 83; sh: 17
file content (15 lines) | stat: -rwxr-xr-x 320 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/perl

use strict;
use warnings;
use utf8;

my @extensions=("*.hh", "*.h", "*.cc", "*.cpp");

my $opts = " --style=file -i ";
foreach my $ext (@extensions) {
	my $cmd = "find . -iname \"$ext\" -exec clang-format  $opts '{}' \\;";
	print STDERR "$0: Formated all files with extension $ext\n";
	system($cmd);
}