aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-08 19:09:33 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-08-08 19:09:33 +0000
commit1cb53b2555fae388a480f353ee1aa597f93839f0 (patch)
treefc1a7bd00afa8ad3ded3f305c6c1fc392976fa72
parente06522f4c7837d67a9c5ff1d06596a2cb6042c67 (diff)
downloadpaludis-1cb53b2555fae388a480f353ee1aa597f93839f0.tar.gz
paludis-1cb53b2555fae388a480f353ee1aa597f93839f0.tar.xz
Better QA output
-rw-r--r--paludis/repositories/e/qa/homepage_key.cc11
-rw-r--r--paludis/repositories/e/qa/short_description_key.cc12
-rw-r--r--paludis/repositories/e/qa/spec_keys.cc18
-rw-r--r--paludis/repositories/e/qa/stray_files.cc2
4 files changed, 18 insertions, 25 deletions
diff --git a/paludis/repositories/e/qa/homepage_key.cc b/paludis/repositories/e/qa/homepage_key.cc
index 52da75f..eb89765 100644
--- a/paludis/repositories/e/qa/homepage_key.cc
+++ b/paludis/repositories/e/qa/homepage_key.cc
@@ -62,7 +62,7 @@ namespace
~HomepageChecker()
{
if (! found_one)
- reporter.message(entry, qaml_normal, name, "Homepage '" + stringify(*id) + "' specifies no URIs");
+ reporter.message(entry, qaml_normal, name, "Homepage specifies no URIs");
}
void visit_leaf(const URIDepSpec & u)
@@ -70,18 +70,17 @@ namespace
found_one = true;
if (! u.renamed_url_suffix().empty())
- reporter.message(entry, qaml_normal, name, "Homepage for '" + stringify(*id) + "' uses -> in part '" + u.text() + "'");
+ reporter.message(entry, qaml_normal, name, "Homepage uses -> in part '" + u.text() + "'");
if (0 == u.original_url().compare(0, 7, "http://") &&
0 == u.original_url().compare(0, 8, "https://") &&
0 == u.original_url().compare(0, 6, "ftp://"))
- reporter.message(entry, qaml_normal, name, "Homepage for '" + stringify(*id) +
- "' uses no or unknown protocol in part '" + u.text() + "'");
+ reporter.message(entry, qaml_normal, name, "Homepage uses no or unknown protocol in part '" + u.text() + "'");
}
void visit_leaf(const LabelsDepSpec<URILabelVisitorTypes> &)
{
- reporter.message(entry, qaml_normal, name, "Homepage '" + stringify(*id) + "' uses labels");
+ reporter.message(entry, qaml_normal, name, "Homepage uses labels");
}
};
}
@@ -96,7 +95,7 @@ paludis::erepository::homepage_key_check(
Context context("When performing check '" + name + "' using homepage_key_check on ID '" + stringify(*id) + "':");
if (! id->homepage_key())
- reporter.message(entry, qaml_normal, name, "No homepage available for '" + stringify(*id) + "'");
+ reporter.message(entry, qaml_normal, name, "No homepage available");
else
{
HomepageChecker h(entry, reporter, id, name);
diff --git a/paludis/repositories/e/qa/short_description_key.cc b/paludis/repositories/e/qa/short_description_key.cc
index 9a443df..131819a 100644
--- a/paludis/repositories/e/qa/short_description_key.cc
+++ b/paludis/repositories/e/qa/short_description_key.cc
@@ -33,18 +33,18 @@ paludis::erepository::short_description_key_check(
Context context("When performing check '" + name + "' using short_description_key_check on ID '" + stringify(*id) + "':");
if (! id->short_description_key())
- reporter.message(entry, qaml_normal, name, "No description available for '" + stringify(*id) + "'");
+ reporter.message(entry, qaml_normal, name, "No description available");
else if (id->short_description_key()->value() == stringify(id->name()))
- reporter.message(entry, qaml_normal, name, "Description for '" + stringify(*id) + "' is equal to PN");
+ reporter.message(entry, qaml_normal, name, "Description is equal to PN");
else if (std::string::npos != id->short_description_key()->value().find("Based on the")
&& std::string::npos != id->short_description_key()->value().find("eclass"))
- reporter.message(entry, qaml_normal, name, "Description for '" + stringify(*id) + "' is about as useful as a chocolate teapot");
+ reporter.message(entry, qaml_normal, name, "Description is about as useful as a chocolate teapot");
else if (id->short_description_key()->value().length() < 10)
- reporter.message(entry, qaml_normal, name, "Description for '" + stringify(*id) + "' is suspiciously short");
+ reporter.message(entry, qaml_normal, name, "Description is suspiciously short");
else if (id->short_description_key()->value().length() > 300)
- reporter.message(entry, qaml_normal, name, "Description for '" + stringify(*id) + "' written by Duncan?");
+ reporter.message(entry, qaml_normal, name, "Description written by Duncan?");
else if (id->short_description_key()->value().length() > 120)
- reporter.message(entry, qaml_normal, name, "Description for '" + stringify(*id) + "' is too long");
+ reporter.message(entry, qaml_normal, name, "Description is too long");
return true;
}
diff --git a/paludis/repositories/e/qa/spec_keys.cc b/paludis/repositories/e/qa/spec_keys.cc
index a17d2cf..8eb9976 100644
--- a/paludis/repositories/e/qa/spec_keys.cc
+++ b/paludis/repositories/e/qa/spec_keys.cc
@@ -72,8 +72,7 @@ namespace
{
if (child_of_any)
reporter.message(entry, qaml_normal, name, "'|| ( )' block with block child '!"
- + stringify(*b.blocked_spec()) + "' in spec key '" + stringify(key.raw_name())
- + "' for ID '" + stringify(*id) + "'");
+ + stringify(*b.blocked_spec()) + "' in spec key '" + stringify(key.raw_name()) + "'");
}
void visit_leaf(const URIDepSpec &)
@@ -93,14 +92,12 @@ namespace
GenericSpecTree::ConstSequenceIterator end)
{
if (child_of_any)
- reporter.message(entry, qaml_normal, name, "'|| ( )' block with use? ( ) child in spec key '" + stringify(key.raw_name())
- + "' for ID '" + stringify(*id) + "'");
+ reporter.message(entry, qaml_normal, name, "'|| ( )' block with 'use? ( )' child in spec key '" + stringify(key.raw_name()) + "'");
Save<unsigned> save_level(&level, level + 1);
Save<bool> save_child_of_any(&child_of_any, false);
if (cur == end)
- reporter.message(entry, qaml_normal, name, "Empty 'use? ( )' block in spec key '" + stringify(key.raw_name())
- + "' for ID '" + stringify(*id) + "'");
+ reporter.message(entry, qaml_normal, name, "Empty 'use? ( )' block in spec key '" + stringify(key.raw_name()) + "'");
else
std::for_each(cur, end, accept_visitor(*this));
}
@@ -114,8 +111,7 @@ namespace
if (cur == end)
{
if (level > 1)
- reporter.message(entry, qaml_normal, name, "Empty '( )' block in spec key '" + stringify(key.raw_name())
- + "' for ID '" + stringify(*id) + "'");
+ reporter.message(entry, qaml_normal, name, "Empty '( )' block in spec key '" + stringify(key.raw_name()) + "'");
}
else
std::for_each(cur, end, accept_visitor(*this));
@@ -128,13 +124,11 @@ namespace
Save<unsigned> save_level(&level, level + 1);
Save<bool> save_child_of_any(&child_of_any, true);
if (cur == end)
- reporter.message(entry, qaml_normal, name, "Empty '|| ( )' block in spec key '" + stringify(key.raw_name())
- + "' for ID '" + stringify(*id) + "'");
+ reporter.message(entry, qaml_normal, name, "Empty '|| ( )' block in spec key '" + stringify(key.raw_name()) + "'");
else if (next(cur) == end)
{
cur->accept(*this);
- reporter.message(entry, qaml_normal, name, "'|| ( )' block with only one child in spec key '" + stringify(key.raw_name())
- + "' for ID '" + stringify(*id) + "'");
+ reporter.message(entry, qaml_normal, name, "'|| ( )' block with only one child in spec key '" + stringify(key.raw_name()) + "'");
}
else
std::for_each(cur, end, accept_visitor(*this));
diff --git a/paludis/repositories/e/qa/stray_files.cc b/paludis/repositories/e/qa/stray_files.cc
index ae3437b..155edc3 100644
--- a/paludis/repositories/e/qa/stray_files.cc
+++ b/paludis/repositories/e/qa/stray_files.cc
@@ -41,7 +41,7 @@ paludis::erepository::stray_files_check(
if (dir.exists())
for (DirIterator d(dir), d_end ; d != d_end ; ++d)
if (stray(repo, *d))
- reporter.message(*d, qaml_normal, name, "Stray file '" + stringify(*d) + "'");
+ reporter.message(*d, qaml_normal, name, "Stray file");
return true;
}