File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -4470,6 +4470,8 @@ sub nextBranchInOwnerBin
4470
4470
return undef ;
4471
4471
}
4472
4472
4473
+ my %annotateWarnings ; # warn only once per file
4474
+
4473
4475
sub _computeAge
4474
4476
{
4475
4477
my ($when , $path ) = @_ ;
@@ -4484,12 +4486,17 @@ sub _computeAge
4484
4486
DateTime-> now();
4485
4487
my $then = lcovutil::parse_w3cdtf($when );
4486
4488
if ($then > $now ) {
4487
- my $data =
4488
- exists ($ENV {SOURCE_DATE_EPOCH }) ?
4489
- " 'SOURCE_DATE_EPOCH=$ENV {SOURCE_DATE_EPOCH}'" :
4490
- " 'now'" ;
4491
- lcovutil::ignorable_error($lcovutil::ERROR_INCONSISTENT_DATA ,
4492
- " File \" $path \" : $data ($now ) is older than annotate time '$when '" );
4489
+ unless (exists ($annotateWarnings {$path })) {
4490
+ # issue annotation warning at most once per file
4491
+ my $data =
4492
+ exists ($ENV {SOURCE_DATE_EPOCH }) ?
4493
+ " 'SOURCE_DATE_EPOCH=$ENV {SOURCE_DATE_EPOCH}'" :
4494
+ " 'now'" ;
4495
+ $annotateWarnings {$path } = $now ;
4496
+ lcovutil::ignorable_error($lcovutil::ERROR_INCONSISTENT_DATA ,
4497
+ " File \" $path \" : $data ($now ) is older than annotate time '$when '"
4498
+ );
4499
+ }
4493
4500
return 0;
4494
4501
}
4495
4502
return $then -> delta_days($now )-> in_units(' days' );
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ TESTS := genhtml lcov gendiffcov py2lcov perl2lcov
17
17
# there may or may not be some .info files generated for exported
18
18
# tools - py2lcov, perl2lcov, etc. We want them included in the
19
19
# report - but they might not have been generated, so we need to
20
- # ignore the potential 'empty glob pattern' error message
20
+ # ignore the potential 'empty glob pattern' error message and a
21
+ # potential remote repo timestamp issue
21
22
report :
22
23
if [ " x$( COVERAGE) " != ' x' ] ; then \
23
24
cover ; \
You can’t perform that action at this time.
0 commit comments