@@ -957,7 +957,7 @@ namespace attributes {
957
957
parseSourceDependencies (sourceFile, &dependencies);
958
958
959
959
// remove main source file
960
- dependencies.erase (std::remove (dependencies.begin (),
960
+ dependencies.erase (std::remove (dependencies.begin (), // #nocov
961
961
dependencies.end (),
962
962
FileInfo (sourceFile)),
963
963
dependencies.end ());
@@ -1263,9 +1263,9 @@ namespace attributes {
1263
1263
// check for a match
1264
1264
Rcpp::CharacterVector match = initMatches[i];
1265
1265
if (match.size () > 0 ) {
1266
- hasPackageInit_ = true ;
1266
+ hasPackageInit_ = true ; // #nocov start
1267
1267
break ;
1268
- }
1268
+ } // #nocov end
1269
1269
}
1270
1270
1271
1271
// Parse embedded R
@@ -1285,9 +1285,9 @@ namespace attributes {
1285
1285
SourceFileAttributesParser parser (dependency, packageName, false );
1286
1286
1287
1287
// copy to base attributes (if it's a new attribute)
1288
- for (SourceFileAttributesParser::const_iterator
1288
+ for (SourceFileAttributesParser::const_iterator // #nocov start
1289
1289
it = parser.begin (); it != parser.end (); ++it) {
1290
- if (std::find (attributes_.begin (), // #nocov start
1290
+ if (std::find (attributes_.begin (),
1291
1291
attributes_.end (),
1292
1292
*it) == attributes_.end ()) {
1293
1293
attributes_.push_back (*it); // #nocov end
@@ -1454,8 +1454,8 @@ namespace attributes {
1454
1454
beginParenLoc == std::string::npos ||
1455
1455
endParenLoc < beginParenLoc) {
1456
1456
1457
- rcppExportNoFunctionFoundWarning (lineNumber);
1458
- return Function ();
1457
+ rcppExportNoFunctionFoundWarning (lineNumber); // #nocov
1458
+ return Function (); // #nocov
1459
1459
}
1460
1460
1461
1461
// Find the type and name by scanning backwards for the whitespace that
@@ -1510,7 +1510,7 @@ namespace attributes {
1510
1510
trimWhitespace (&arg);
1511
1511
if (arg.empty ()) {
1512
1512
// we don't warn here because the compilation will fail anyway
1513
- continue ;
1513
+ continue ; // #nocov
1514
1514
}
1515
1515
1516
1516
// If the argument has an = within it then it has a default value
@@ -1656,12 +1656,12 @@ namespace attributes {
1656
1656
case ' >' :
1657
1657
templateCount--;
1658
1658
break ;
1659
- case ' (' :
1660
- parenCount++; // #nocov
1661
- break ; // #nocov
1659
+ case ' (' : // #nocov start
1660
+ parenCount++;
1661
+ break ;
1662
1662
case ' )' :
1663
- parenCount--; // #nocov
1664
- break ; // #nocov
1663
+ parenCount--;
1664
+ break ; // #nocov end
1665
1665
}
1666
1666
}
1667
1667
}
@@ -2445,12 +2445,12 @@ namespace attributes {
2445
2445
ostr () << " invisible(" ; // #nocov
2446
2446
ostr () << " .Call(" ;
2447
2447
if (!registration_)
2448
- ostr () << " '" ;
2448
+ ostr () << " '" ; // #nocov
2449
2449
else
2450
2450
ostr () << " `" ;
2451
2451
ostr () << packageCppPrefix () << " _" << function.name ();
2452
2452
if (!registration_)
2453
- ostr () << " ', " << " PACKAGE = '" << package () << " '" ;
2453
+ ostr () << " ', " << " PACKAGE = '" << package () << " '" ; // #nocov
2454
2454
else
2455
2455
ostr () << " `" ;
2456
2456
@@ -2972,7 +2972,7 @@ namespace attributes {
2972
2972
2973
2973
// skip empty case
2974
2974
if (pStr->empty ())
2975
- return ;
2975
+ return ; // #nocov
2976
2976
2977
2977
// trim right
2978
2978
std::string::size_type pos = pStr->find_last_not_of (kWhitespaceChars );
@@ -3572,14 +3572,14 @@ BEGIN_RCPP
3572
3572
// don't process RcppExports.cpp
3573
3573
std::string cppFile = cppFiles[i];
3574
3574
if (endsWith (cppFile, " RcppExports.cpp" ))
3575
- continue ;
3575
+ continue ; // #nocov
3576
3576
3577
3577
// parse file
3578
3578
SourceFileAttributesParser attributes (cppFile, packageName, false );
3579
3579
3580
3580
// note if we found a package init function
3581
3581
if (!hasPackageInit && attributes.hasPackageInit ())
3582
- hasPackageInit = true ;
3582
+ hasPackageInit = true ; // #nocov
3583
3583
3584
3584
// continue if no generator output
3585
3585
if (!attributes.hasGeneratorOutput ())
@@ -3618,7 +3618,7 @@ BEGIN_RCPP
3618
3618
depends.begin (), depends.end (),
3619
3619
std::back_inserter (diff));
3620
3620
if (!diff.empty ()) {
3621
- std::string msg =
3621
+ std::string msg = // #nocov start
3622
3622
" The following packages are referenced using Rcpp::depends "
3623
3623
" attributes however are not listed in the Depends, Imports or "
3624
3624
" LinkingTo fields of the package DESCRIPTION file: " ;
@@ -3627,7 +3627,7 @@ BEGIN_RCPP
3627
3627
if (i != (diff.size ()-1 ))
3628
3628
msg += " , " ;
3629
3629
}
3630
- showWarning (msg);
3630
+ showWarning (msg); // #nocov end
3631
3631
}
3632
3632
3633
3633
// verbose output
0 commit comments