aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-22 22:07:04 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2007-02-22 22:07:04 +0000
commit356e6d71e679a40a36e7501315cded23f0558af7 (patch)
tree859c02b1f22eba46b780c1f4bc8ef12b508d8ca8
parent70023695a1f12b8f6b749e3d3840c845b17b0116 (diff)
downloadpaludis-356e6d71e679a40a36e7501315cded23f0558af7.tar.gz
paludis-356e6d71e679a40a36e7501315cded23f0558af7.tar.xz
Improve
-rw-r--r--paludis/qa/broken_global_variables_check.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/paludis/qa/broken_global_variables_check.cc b/paludis/qa/broken_global_variables_check.cc
index d6784ba..68c15e0 100644
--- a/paludis/qa/broken_global_variables_check.cc
+++ b/paludis/qa/broken_global_variables_check.cc
@@ -36,6 +36,7 @@ BrokenGlobalVariablesCheck::operator() (const FSEntry & f) const
CheckResult result(f, identifier());
static pcrepp::Pcre::Pcre r_global("^[a-zA-Z0-9\\_]+=.*\\$[{}]?KV");
+ static pcrepp::Pcre::Pcre r_detect_version("^detect_version$");
if (! f.is_regular_file())
result << Message(qal_skip, "Not a regular file");
@@ -55,6 +56,9 @@ BrokenGlobalVariablesCheck::operator() (const FSEntry & f) const
{
++line_number;
+ if (r_detect_version.search(line))
+ break;
+
if (r_global.search(line))
result << Message(qal_maybe, "Suspect global variable on line "
+ stringify(line_number) + ": " + strip_leading(line, " \t"));