aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Danny van Dyk <dvandyk@exherbo.org> 2006-07-12 11:16:03 +0000
committerAvatar Danny van Dyk <dvandyk@exherbo.org> 2006-07-12 11:16:03 +0000
commitea53db2da086d058d1e836a3f540c72ef5a9a8c0 (patch)
tree6f31ecec8b717ea9418b0e822dcacff83944f572
parentdd6c6601f7dbbec7f9d31c3e8843fd9017f93183 (diff)
downloadpaludis-ea53db2da086d058d1e836a3f540c72ef5a9a8c0.tar.gz
paludis-ea53db2da086d058d1e836a3f540c72ef5a9a8c0.tar.xz
Removed '--check' commandline action. Qualudis now runs checks by default. Added '--qa-check' commandline option to specify which checks should be run.
-rw-r--r--src/qualudis/qualudis.cc17
-rw-r--r--src/qualudis/qualudis_command_line.cc4
-rw-r--r--src/qualudis/qualudis_command_line.hh6
3 files changed, 14 insertions, 13 deletions
diff --git a/src/qualudis/qualudis.cc b/src/qualudis/qualudis.cc
index 8a5073b..0a26832 100644
--- a/src/qualudis/qualudis.cc
+++ b/src/qualudis/qualudis.cc
@@ -155,6 +155,13 @@ namespace
for (std::list<std::string>::const_iterator i(checks.begin()),
i_end(checks.end()) ; i != i_end ; ++i)
{
+ if (QualudisCommandLine::get_instance()->a_qa_checks.specified())
+ if (QualudisCommandLine::get_instance()->a_qa_checks.args_end() == std::find(
+ QualudisCommandLine::get_instance()->a_qa_checks.args_begin(),
+ QualudisCommandLine::get_instance()->a_qa_checks.args_end(),
+ *i))
+ continue;
+
try
{
Context context("When performing check '" + stringify(*i) + "':");
@@ -432,14 +439,6 @@ int main(int argc, char *argv[])
if (QualudisCommandLine::get_instance()->a_version.specified())
throw DoVersion();
- if (QualudisCommandLine::get_instance()->a_check.specified())
- {
- if (! QualudisCommandLine::get_instance()->empty())
- throw DoHelp("check action takes no parameters");
-
- return do_check(FSEntry::cwd()) ? EXIT_SUCCESS : EXIT_FAILURE;
- }
-
if (QualudisCommandLine::get_instance()->a_describe.specified())
{
if (! QualudisCommandLine::get_instance()->empty())
@@ -493,6 +492,8 @@ int main(int argc, char *argv[])
}
return EXIT_SUCCESS;
}
+ else
+ return do_check(FSEntry::cwd()) ? EXIT_SUCCESS : EXIT_FAILURE;
throw InternalError(__PRETTY_FUNCTION__, "no action?");
}
diff --git a/src/qualudis/qualudis_command_line.cc b/src/qualudis/qualudis_command_line.cc
index ed279da..dd1104f 100644
--- a/src/qualudis/qualudis_command_line.cc
+++ b/src/qualudis/qualudis_command_line.cc
@@ -23,12 +23,12 @@ QualudisCommandLine::QualudisCommandLine() :
ArgsHandler(),
action_args(this, "Actions (specify exactly one)"),
- a_check(&action_args, "check", 'c', "Check the current directory"),
a_describe(&action_args, "describe", 'd', "Describe checks"),
a_version(&action_args, "version", 'V', "Display program version"),
a_help(&action_args, "help", 'h', "Display program help"),
- check_options(this, "Options for --check"),
+ check_options(this, "Options for general checks"),
+ a_qa_checks(&check_options, "qa-check", 'c', "Only perform given check."),
a_verbose(&check_options, "verbose", 'v', "Be verbose"),
a_log_level(&check_options, "log-level", 'L', "Specify the log level",
paludis::args::EnumArg::EnumArgOptions("debug", "Show debug output (noisy)")
diff --git a/src/qualudis/qualudis_command_line.hh b/src/qualudis/qualudis_command_line.hh
index 3863499..d780f53 100644
--- a/src/qualudis/qualudis_command_line.hh
+++ b/src/qualudis/qualudis_command_line.hh
@@ -27,9 +27,6 @@ class QualudisCommandLine :
/// Action arguments.
paludis::args::ArgsGroup action_args;
- /// --check
- paludis::args::SwitchArg a_check;
-
/// --describe
paludis::args::SwitchArg a_describe;
@@ -47,6 +44,9 @@ class QualudisCommandLine :
/// Check options.
paludis::args::ArgsGroup check_options;
+ /// --qa-checks
+ paludis::args::StringSetArg a_qa_checks;
+
/// --verbose
paludis::args::SwitchArg a_verbose;