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

mbits-os / quick_dra / 22038263728

15 Feb 2026 03:31PM UTC coverage: 93.378% (+6.4%) from 87.008%
22038263728

Pull #39

github

web-flow
Merge 74a89bbd4 into 7d773e4d9
Pull Request #39: testing

58 of 67 new or added lines in 23 files covered. (86.57%)

75 existing lines in 12 files now uncovered.

4033 of 4319 relevant lines covered (93.38%)

1107.01 hits per line

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

68.75
/libs/cli/src/commands.cpp
1
// Copyright (c) 2026 midnightBITS
2
// This code is licensed under MIT license (see LICENSE for details)
3

4
#include "commands.hpp"
5
#include <functional>
6
#include <string>
7
#include <utility>
8

9
using namespace std::literals;
10

11
namespace quick_dra {
12
        int tools::handle(std::string_view tool,
363✔
13
                          args::arglist args,
14
                          std::string_view tool_name) const {
1✔
15
                for (auto const& command : commands_) {
2,647✔
16
                        if (command.name != tool) continue;
883✔
17
                        std::string name{};
364✔
18
                        name.reserve(tool_name.size() + tool.size() + 1);
1,090✔
19
                        name.append(tool_name);
1,090✔
20
                        name.push_back(' ');
1,090✔
21
                        name.append(tool);
1,090✔
22
                        return command.tool(name, args, command.description);
23
                }  // GCOV_EXCL_LINE[WIN32]
2,049✔
24

25
                return -ENOENT;
26
        }
727✔
27

28
        std::set<std::string> tools::list_commands() const {
29
                std::set<std::string, std::less<>> commands{};
30

31
                for (auto const& builtin : commands_) {
UNCOV
32
                        auto it = commands.lower_bound(builtin.name);
×
33
                        if (it == commands.end() || *it != builtin.name)
34
                                commands.insert(
35
                                    it, std::string{builtin.name.data(), builtin.name.size()});
36
                }
37

UNCOV
38
                std::set<std::string> result{};
×
UNCOV
39
                result.merge(std::move(commands));
×
UNCOV
40
                return result;
×
UNCOV
41
        }
×
42
}  // namespace quick_dra
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