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

wirenboard / wb-mqtt-w1 / 2

31 Jul 2026 09:52AM UTC coverage: 61.341% (+2.2%) from 59.111%
2

Pull #36

github

450382
ekateluv
Add missing cstdint include in test/utils.h

clang-tidy 22 in the updated devenv image no longer gets uint8_t
transitively from other standard headers.
Pull Request #36: Use exported vars instead of MAKEFLAGS for coverage options

172 of 248 branches covered (69.35%)

311 of 507 relevant lines covered (61.34%)

9.1 hits per line

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

29.17
/file_utils.cpp
1
#include "file_utils.h"
2

3
#include <cstring>
4
#include <dirent.h>
5
#include <filesystem>
6
#include <iomanip>
7

8
TNoDirError::TNoDirError(const std::string& msg): std::runtime_error(msg)
×
9
{}
×
10

11
bool TryOpen(const std::vector<std::string>& fnames, std::ifstream& file)
×
12
{
13
    for (auto& fname: fnames) {
×
14
        file.open(fname);
×
15
        if (file.is_open()) {
×
16
            return true;
×
17
        }
18
        file.clear();
×
19
    }
20
    return false;
×
21
}
22

23
void WriteToFile(const std::string& fileName, const std::string& value)
×
24
{
25
    std::ofstream f;
×
26
    OpenWithException(f, fileName);
×
27
    f << value;
×
28
}
×
29

30
void IterateDir(const std::string& dirName, std::function<bool(const std::string&)> fn)
40✔
31
{
32
    try {
33
        const std::filesystem::path dirPath{dirName};
40✔
34

35
        for (const auto& entry: std::filesystem::directory_iterator(dirPath)) {
90✔
36
            const auto filenameStr = entry.path().filename().string();
50✔
37
            if (fn(filenameStr)) {
50✔
38
                return;
×
39
            }
40
        }
90✔
41
    } catch (std::filesystem::filesystem_error const& ex) {
40✔
42
        throw TNoDirError(ex.what());
×
43
    }
×
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc