mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-09-08 06:10:36 +02:00
add initial bulk run from pre-commit over all files
This commit is contained in:
parent
665aeeef61
commit
93356b39c3
418 changed files with 21354 additions and 23858 deletions
24
src/nag.cpp
24
src/nag.cpp
|
@ -24,11 +24,13 @@
|
|||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmake.h>
|
||||
|
||||
#include <algorithm>
|
||||
// cmake.h include header must come first
|
||||
|
||||
#include <Context.h>
|
||||
|
||||
#include <iterator>
|
||||
#include <unordered_set>
|
||||
#include <utility>
|
||||
|
@ -36,23 +38,17 @@
|
|||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// Generates a nag message when there are READY tasks of a higher urgency.
|
||||
void nag (std::vector <Task>& tasks)
|
||||
{
|
||||
auto msg = Context::getContext ().config.get ("nag");
|
||||
if (msg == "")
|
||||
return;
|
||||
void nag(std::vector<Task>& tasks) {
|
||||
auto msg = Context::getContext().config.get("nag");
|
||||
if (msg == "") return;
|
||||
|
||||
auto pending = Context::getContext ().tdb2.pending_tasks ();
|
||||
auto pending = Context::getContext().tdb2.pending_tasks();
|
||||
for (auto& t1 : tasks) {
|
||||
if (t1.hasTag ("nonag"))
|
||||
continue;
|
||||
if (t1.hasTag("nonag")) continue;
|
||||
|
||||
for (auto& t2 : pending) {
|
||||
if (t1.get ("uuid") != t2.get ("uuid") &&
|
||||
t2.hasTag ("READY") &&
|
||||
t1.urgency () < t2.urgency ())
|
||||
{
|
||||
Context::getContext ().footnote (msg);
|
||||
if (t1.get("uuid") != t2.get("uuid") && t2.hasTag("READY") && t1.urgency() < t2.urgency()) {
|
||||
Context::getContext().footnote(msg);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue