validate: Moved verbose check

This commit is contained in:
Paul Beckingham 2016-07-09 10:31:00 -04:00
parent 94ed12de2f
commit 0cbf9a0bdd

View file

@ -92,9 +92,12 @@ static void autoAdjust (
////////////////////////////////////////////////////////////////////////////////
// Warn on new tag.
static void warnOnNewTag (
const Rules& rules,
Database& database,
const Interval& interval)
{
if (rules.getBoolean ("verbose"))
{
std::set <std::string> tags;
for (auto& line : database.allLines ())
{
@ -111,6 +114,7 @@ static void warnOnNewTag (
for (auto& tag : interval.tags ())
if (tags.find (tag) == tags.end ())
std::cout << "Note: '" << tag << "' is a new tag.\n";
}
}
////////////////////////////////////////////////////////////////////////////////
@ -131,8 +135,7 @@ void validate (
if (findHint (cli, ":adjust"))
autoAdjust (rules, database, filter, interval);
if (rules.getBoolean ("verbose"))
warnOnNewTag (database, interval);
warnOnNewTag (rules, database, interval);
}
////////////////////////////////////////////////////////////////////////////////