Dependencies

- Added 'depends' to Config.cpp.
- Added formatting for the 'depends' column.
- Added notes to t.t.cpp regarding missing tests.
This commit is contained in:
Paul Beckingham 2010-07-12 01:45:53 -04:00
parent 90c40dbebf
commit 93e862b367
3 changed files with 34 additions and 7 deletions

View file

@ -591,6 +591,24 @@ int handleCustomReport (const std::string& report, std::string &outs)
}
}
else if (*col == "depends")
{
table.addColumn (columnLabels[*col] != "" ? columnLabels[*col] : "Deps");
table.setColumnWidth (columnCount, Table::minimum);
table.setColumnJustification (columnCount, Table::left);
int row = 0;
std::vector <int> all;
std::string deps;
foreach (task, tasks)
{
task->getDependencies (all);
join (deps, " ", all);
context.hooks.trigger ("format-depends", "depends", deps);
table.addCell (row++, columnCount, deps);
}
}
// Common to all columns.
// Add underline.
if ((context.config.getBoolean ("color") || context.config.getBoolean ("_forcecolor")) &&
@ -752,7 +770,8 @@ void validReportColumns (const std::vector <std::string>& columns)
*it != "tag_indicator" &&
*it != "description_only" &&
*it != "description" &&
*it != "wait")
*it != "wait" &&
*it != "depends")
bad.push_back (*it);
if (bad.size ())