aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-16 17:54:12 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-16 17:54:12 +0000
commit71920fb40a1ba9349ecb42301c7ce85ce1556a57 (patch)
tree20437f4c074d8f90bad46e297c540a235af9cf06
parent510ac7c3fe551629dff0bf6eca72e865cf455237 (diff)
downloadpaludis-71920fb40a1ba9349ecb42301c7ce85ce1556a57.tar.gz
paludis-71920fb40a1ba9349ecb42301c7ce85ce1556a57.tar.xz
Better output
-rw-r--r--paludis/qa/root_check.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/paludis/qa/root_check.cc b/paludis/qa/root_check.cc
index a32e400..0ff1e6e 100644
--- a/paludis/qa/root_check.cc
+++ b/paludis/qa/root_check.cc
@@ -60,7 +60,7 @@ RootCheck::operator() (const FSEntry & f) const
else
{
State state(st_default);
- std::string line;
+ std::string line, func;
unsigned line_number(0);
while (std::getline(ff, line))
@@ -72,7 +72,12 @@ RootCheck::operator() (const FSEntry & f) const
case st_default:
{
if (r_start.search(line))
+ {
state = st_in_src;
+ func = line;
+ if (std::string::npos != func.find('('))
+ func = func.substr(0, func.find('('));
+ }
}
continue;
@@ -81,7 +86,7 @@ RootCheck::operator() (const FSEntry & f) const
if (r_end.search(line))
state = st_default;
else if (r_root.search(line))
- result << Message(qal_maybe, "Apparent ROOT abuse on line "
+ result << Message(qal_maybe, "ROOT abuse in " + func + " on line "
+ stringify(line_number) + ": " + strip_leading(line, " \t"));
}
continue;