• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

polserver / polserver / 25918451630

15 May 2026 12:43PM UTC coverage: 60.929% (+2.1%) from 58.859%
25918451630

push

github

turleypol
added dynamic property which returns a pointer of the object instead of
a copy like the current imp.
needed to be able to eg store a vector

43 of 61 new or added lines in 2 files covered. (70.49%)

14455 existing lines in 345 files now uncovered.

44695 of 73356 relevant lines covered (60.93%)

449621.59 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

95.24
/pol-core/bscript/compiler/file/SourceFileIdentifier.cpp
1
#include "SourceFileIdentifier.h"
2
#include "clib/filecont.h"
3
#include "clib/strutil.h"
4

5
namespace Pol::Bscript::Compiler
6
{
7
SourceFileIdentifier::SourceFileIdentifier( unsigned index, std::string pathname )
9,814✔
8
    : index( index ), pathname( std::move( pathname ) ), _lines()
9,814✔
9
{
10
}
9,814✔
11

12
const std::vector<std::string>& SourceFileIdentifier::getLines() const
23,831✔
13
{
14
  if ( !_lines.empty() )
23,831✔
15
    return _lines;
21,682✔
16

17
  Clib::FileContents cont{ pathname.c_str(), true };
2,149✔
18
  std::string content{ cont.contents() };
2,149✔
19
  Clib::sanitizeUnicodeWithIso( &content );
2,149✔
20
  std::string::size_type pos = 0;
2,149✔
21
  std::string::size_type prev = 0;
2,149✔
22

23
  while ( ( pos = content.find_first_of( "\n\r", prev ) ) != std::string::npos )
39,662✔
24
  {
25
    auto strpos = pos;
37,513✔
26
    if ( content[pos] == '\r' && pos + 1 < content.size() && content[pos + 1] == '\n' )
37,513✔
UNCOV
27
      ++pos;  // windows lineendings..
×
28
    _lines.push_back( content.substr( prev, strpos - prev ) );
37,513✔
29
    prev = pos + 1;
37,513✔
30
  }
31

32
  if ( prev < content.length() )
2,149✔
33
    _lines.push_back( content.substr( prev ) );
4✔
34

35
  return _lines;
2,149✔
36
}
2,149✔
37
}  // namespace Pol::Bscript::Compiler
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc