aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-14 09:45:20 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-14 09:45:20 +0000
commit1051ef659e7a52501103e31fef7e9f4dd7df69de (patch)
tree2a4ec20dd52d55d37661941e49a4565bf61f1717
parent8eb93a9e697cec56aad236cfd11fc5fc14f8e421 (diff)
downloadpaludis-1051ef659e7a52501103e31fef7e9f4dd7df69de.tar.gz
paludis-1051ef659e7a52501103e31fef7e9f4dd7df69de.tar.xz
Add qualudis --verbose
-rw-r--r--src/qualudis/qualudis.cc10
-rw-r--r--src/qualudis/qualudis_command_line.cc5
-rw-r--r--src/qualudis/qualudis_command_line.hh11
3 files changed, 25 insertions, 1 deletions
diff --git a/src/qualudis/qualudis.cc b/src/qualudis/qualudis.cc
index 87fa708..9018321 100644
--- a/src/qualudis/qualudis.cc
+++ b/src/qualudis/qualudis.cc
@@ -48,6 +48,13 @@ struct DoVersion
};
void
+display_no_errors(const qa::CheckResult & r)
+{
+ if (QualudisCommandLine::get_instance()->a_verbose.specified())
+ cout << r.item() << ": " << r.rule() << ":" << endl;
+}
+
+void
display_errors(const qa::CheckResult & r)
{
cout << r.item() << ": " << r.rule() << ":" << endl;
@@ -101,7 +108,10 @@ do_check()
qa::CheckResult r((*qa::PackageDirCheckMaker::get_instance()->find_maker(*i)())(cwd));
if (r.empty())
+ {
+ display_no_errors(r);
continue;
+ }
display_errors(r);
diff --git a/src/qualudis/qualudis_command_line.cc b/src/qualudis/qualudis_command_line.cc
index 57edd17..c83e1b7 100644
--- a/src/qualudis/qualudis_command_line.cc
+++ b/src/qualudis/qualudis_command_line.cc
@@ -25,7 +25,10 @@ QualudisCommandLine::QualudisCommandLine() :
action_args(this, "Actions (specify exactly one)"),
a_check(&action_args, "check", 'c', "Check the current directory"),
a_version(&action_args, "version", 'V', "Display program version"),
- a_help(&action_args, "help", 'h', "Display program help")
+ a_help(&action_args, "help", 'h', "Display program help"),
+
+ check_options(this, "Options for --check"),
+ a_verbose(&check_options, "verbose", 'v', "Be verbose")
{
}
diff --git a/src/qualudis/qualudis_command_line.hh b/src/qualudis/qualudis_command_line.hh
index 93b03fb..8d77be9 100644
--- a/src/qualudis/qualudis_command_line.hh
+++ b/src/qualudis/qualudis_command_line.hh
@@ -36,6 +36,17 @@ class QualudisCommandLine :
paludis::args::SwitchArg a_help;
///}
+
+ /// \name Check options
+ ///{
+
+ /// Check options.
+ paludis::args::ArgsGroup check_options;
+
+ /// --verbose
+ paludis::args::SwitchArg a_verbose;
+
+ ///}
};