@@ -957,7 +957,7 @@ namespace attributes {
957957 parseSourceDependencies (sourceFile, &dependencies);
958958
959959 // remove main source file
960- dependencies.erase (std::remove (dependencies.begin (),
960+ dependencies.erase (std::remove (dependencies.begin (), // #nocov
961961 dependencies.end (),
962962 FileInfo (sourceFile)),
963963 dependencies.end ());
@@ -1263,9 +1263,9 @@ namespace attributes {
12631263 // check for a match
12641264 Rcpp::CharacterVector match = initMatches[i];
12651265 if (match.size () > 0 ) {
1266- hasPackageInit_ = true ;
1266+ hasPackageInit_ = true ; // #nocov start
12671267 break ;
1268- }
1268+ } // #nocov end
12691269 }
12701270
12711271 // Parse embedded R
@@ -1285,9 +1285,9 @@ namespace attributes {
12851285 SourceFileAttributesParser parser (dependency, packageName, false );
12861286
12871287 // copy to base attributes (if it's a new attribute)
1288- for (SourceFileAttributesParser::const_iterator
1288+ for (SourceFileAttributesParser::const_iterator // #nocov start
12891289 it = parser.begin (); it != parser.end (); ++it) {
1290- if (std::find (attributes_.begin (), // #nocov start
1290+ if (std::find (attributes_.begin (),
12911291 attributes_.end (),
12921292 *it) == attributes_.end ()) {
12931293 attributes_.push_back (*it); // #nocov end
@@ -1454,8 +1454,8 @@ namespace attributes {
14541454 beginParenLoc == std::string::npos ||
14551455 endParenLoc < beginParenLoc) {
14561456
1457- rcppExportNoFunctionFoundWarning (lineNumber);
1458- return Function ();
1457+ rcppExportNoFunctionFoundWarning (lineNumber); // #nocov
1458+ return Function (); // #nocov
14591459 }
14601460
14611461 // Find the type and name by scanning backwards for the whitespace that
@@ -1510,7 +1510,7 @@ namespace attributes {
15101510 trimWhitespace (&arg);
15111511 if (arg.empty ()) {
15121512 // we don't warn here because the compilation will fail anyway
1513- continue ;
1513+ continue ; // #nocov
15141514 }
15151515
15161516 // If the argument has an = within it then it has a default value
@@ -1656,12 +1656,12 @@ namespace attributes {
16561656 case ' >' :
16571657 templateCount--;
16581658 break ;
1659- case ' (' :
1660- parenCount++; // #nocov
1661- break ; // #nocov
1659+ case ' (' : // #nocov start
1660+ parenCount++;
1661+ break ;
16621662 case ' )' :
1663- parenCount--; // #nocov
1664- break ; // #nocov
1663+ parenCount--;
1664+ break ; // #nocov end
16651665 }
16661666 }
16671667 }
@@ -2445,12 +2445,12 @@ namespace attributes {
24452445 ostr () << " invisible(" ; // #nocov
24462446 ostr () << " .Call(" ;
24472447 if (!registration_)
2448- ostr () << " '" ;
2448+ ostr () << " '" ; // #nocov
24492449 else
24502450 ostr () << " `" ;
24512451 ostr () << packageCppPrefix () << " _" << function.name ();
24522452 if (!registration_)
2453- ostr () << " ', " << " PACKAGE = '" << package () << " '" ;
2453+ ostr () << " ', " << " PACKAGE = '" << package () << " '" ; // #nocov
24542454 else
24552455 ostr () << " `" ;
24562456
@@ -2972,7 +2972,7 @@ namespace attributes {
29722972
29732973 // skip empty case
29742974 if (pStr->empty ())
2975- return ;
2975+ return ; // #nocov
29762976
29772977 // trim right
29782978 std::string::size_type pos = pStr->find_last_not_of (kWhitespaceChars );
@@ -3572,14 +3572,14 @@ BEGIN_RCPP
35723572 // don't process RcppExports.cpp
35733573 std::string cppFile = cppFiles[i];
35743574 if (endsWith (cppFile, " RcppExports.cpp" ))
3575- continue ;
3575+ continue ; // #nocov
35763576
35773577 // parse file
35783578 SourceFileAttributesParser attributes (cppFile, packageName, false );
35793579
35803580 // note if we found a package init function
35813581 if (!hasPackageInit && attributes.hasPackageInit ())
3582- hasPackageInit = true ;
3582+ hasPackageInit = true ; // #nocov
35833583
35843584 // continue if no generator output
35853585 if (!attributes.hasGeneratorOutput ())
@@ -3618,7 +3618,7 @@ BEGIN_RCPP
36183618 depends.begin (), depends.end (),
36193619 std::back_inserter (diff));
36203620 if (!diff.empty ()) {
3621- std::string msg =
3621+ std::string msg = // #nocov start
36223622 " The following packages are referenced using Rcpp::depends "
36233623 " attributes however are not listed in the Depends, Imports or "
36243624 " LinkingTo fields of the package DESCRIPTION file: " ;
@@ -3633,7 +3633,7 @@ BEGIN_RCPP
36333633 // verbose output
36343634 if (verbose) {
36353635 for (size_t i=0 ; i<updated.size (); i++)
3636- Rcpp::Rcout << updated[i] << " updated." << std::endl;
3636+ Rcpp::Rcout << updated[i] << " updated." << std::endl; // #nocov end
36373637 }
36383638
36393639 // return files updated
0 commit comments