aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-15 01:18:27 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-15 01:18:27 +0000
commit5bcb9d78e84c0ef065fb4e0b9b6e6dea2d235ff6 (patch)
treea46bf16ba851d8a5ecd96bc4b06b57824e31d2b4
parentb5a06c90902a81a36ef8eba8ae45fe75171fcb9a (diff)
downloadpaludis-5bcb9d78e84c0ef065fb4e0b9b6e6dea2d235ff6.tar.gz
paludis-5bcb9d78e84c0ef065fb4e0b9b6e6dea2d235ff6.tar.xz
SHow description lengths
-rw-r--r--paludis/qa/description_check.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/paludis/qa/description_check.cc b/paludis/qa/description_check.cc
index 6d8a471..8e0c1cc 100644
--- a/paludis/qa/description_check.cc
+++ b/paludis/qa/description_check.cc
@@ -39,12 +39,13 @@ DescriptionCheck::operator() (const EbuildCheckData & e) const
VersionMetadata::ConstPointer metadata(
e.get<ecd_environment>()->package_database()->fetch_metadata(ee));
- if (0 == metadata->get(vmk_description).length())
+ const std::string::size_type length(metadata->get(vmk_description).length());
+ if (0 == length)
result << Message(qal_major, "DESCRIPTION unset or empty");
- else if (metadata->get(vmk_description).length() < 10)
- result << Message(qal_minor, "DESCRIPTION suspiciously short");
- else if (metadata->get(vmk_description).length() > 120)
- result << Message(qal_minor, "DESCRIPTION too long");
+ else if (length < 10)
+ result << Message(qal_minor, "DESCRIPTION suspiciously short (" + stringify(length) + ")");
+ else if (length > 120)
+ result << Message(qal_minor, "DESCRIPTION too long (" + stringify(length) + ")");
}
catch (const InternalError &)