MCPcopy Create free account
hub / github.com/GothenburgBitFactory/taskwarrior / execute

Method execute

src/commands/CmdCount.cpp:51–62  ·  view source on GitHub ↗

///////////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

49
50////////////////////////////////////////////////////////////////////////////////
51int CmdCount::execute(std::string& output) {
52 // Apply filter.
53 Filter filter;
54 std::vector<Task> filtered;
55 filter.subset(filtered);
56
57 // Find number of matching tasks. Skip recurring parent tasks.
58 int count = std::count_if(filtered.begin(), filtered.end(),
59 [](const auto& task) { return task.getStatus() != Task::recurring; });
60 output = format(count) + '\n';
61 return 0;
62}
63
64////////////////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 2

subsetMethod · 0.80
getStatusMethod · 0.80

Tested by

no test coverage detected