mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 23:59:37 +02:00
graph.pl includes .mm files, and unpaired .h ; reveals more cycles...
... There is now a new big blob of 40 and a smaller one of 4
This commit is contained in:
parent
9dfa8f205c
commit
6541e808be
@ -19,19 +19,23 @@ my $links = 1;
|
||||
my $dir = "../src";
|
||||
|
||||
my %names; # string to string
|
||||
foreach my $file (`find $dir -name '*.cpp'`) {
|
||||
my $short = $file;
|
||||
chop $short;
|
||||
$short =~ s|.cpp$||;
|
||||
my $shorter = ($short =~ s|^.*/||r);
|
||||
$names{$shorter} = $short;
|
||||
{
|
||||
foreach my $file (`find $dir -name '*.cpp' -o -name '*.h' -o -name '*.mm'`) {
|
||||
my $short = $file;
|
||||
chop $short;
|
||||
$short =~ s|\.cpp$||;
|
||||
$short =~ s|\.h$||;
|
||||
$short =~ s|\.mm$||;
|
||||
my $shorter = ($short =~ s|^.*/||r);
|
||||
$names{$shorter} = $short;
|
||||
}
|
||||
}
|
||||
|
||||
#my $linkroot = "https://github.com/audacity/audacity/tree/master/src";
|
||||
my $linkroot = "file://" . File::Spec->rel2abs( $dir );
|
||||
|
||||
|
||||
print STDERR "Found ", scalar( keys %names ), " .cpp file(s)\n" if $traceLevel >= 1;
|
||||
print STDERR "Found ", scalar( keys %names ), " filename(s)\n" if $traceLevel >= 1;
|
||||
|
||||
# Step 2: collect inclusions in each .cpp/.h pair, and folder information,
|
||||
# and build a graph
|
||||
@ -79,7 +83,7 @@ while( my ($shorter, $short) = each(%names) ) {
|
||||
chop;
|
||||
my @components = split '/';
|
||||
my $include = $components[-1];
|
||||
# omit self-arcs and arcs to .h files without corresponding .cpp
|
||||
# omit self-arcs and arcs to .h files external to the project
|
||||
if (($shorter ne $include) && (exists $names{$include})) {
|
||||
$graph{$shorter}{$include} = (), ++$arcs;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user