aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-17 00:18:22 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2006-02-17 00:18:22 +0000
commita8b4e7c3f2f252e7e3ab66adb8a62a0297e76d44 (patch)
tree848a01855844f2cecd6955007c267f90b5362de8
parentf5fa7d18d02f58ef6367b91eb4587261c150dc0f (diff)
downloadpaludis-a8b4e7c3f2f252e7e3ab66adb8a62a0297e76d44.tar.gz
paludis-a8b4e7c3f2f252e7e3ab66adb8a62a0297e76d44.tar.xz
Message improvements
-rw-r--r--paludis/qa/description_check.cc6
-rw-r--r--paludis/qa/ebuild_count.cc8
-rw-r--r--paludis/qa/files_dir_size_check.cc8
3 files changed, 19 insertions, 3 deletions
diff --git a/paludis/qa/description_check.cc b/paludis/qa/description_check.cc
index 8e0c1cc..e9f2ad7 100644
--- a/paludis/qa/description_check.cc
+++ b/paludis/qa/description_check.cc
@@ -18,6 +18,7 @@
*/
#include "description_check.hh"
+#include <strings.h>
using namespace paludis;
using namespace paludis::qa;
@@ -42,8 +43,13 @@ DescriptionCheck::operator() (const EbuildCheckData & e) const
const std::string::size_type length(metadata->get(vmk_description).length());
if (0 == length)
result << Message(qal_major, "DESCRIPTION unset or empty");
+ else if (0 == strcasecmp(e.get<ecd_name>().get<qpn_package>().data().c_str(),
+ metadata->get(vmk_description).c_str()))
+ result << Message(qal_major, "DESCRIPTION equal to $PN? You can do better than that.");
else if (length < 10)
result << Message(qal_minor, "DESCRIPTION suspiciously short (" + stringify(length) + ")");
+ else if (length > 300)
+ result << Message(qal_minor, "DESCRIPTION written by Duncan? (" + stringify(length) + ")");
else if (length > 120)
result << Message(qal_minor, "DESCRIPTION too long (" + stringify(length) + ")");
diff --git a/paludis/qa/ebuild_count.cc b/paludis/qa/ebuild_count.cc
index 6384d48..510d13d 100644
--- a/paludis/qa/ebuild_count.cc
+++ b/paludis/qa/ebuild_count.cc
@@ -35,7 +35,13 @@ EbuildCountCheck::operator() (const FSEntry & d) const
CheckResult result(d, identifier());
std::size_t count(std::count_if(DirIterator(d), DirIterator(), IsFileWithExtension(".ebuild")));
- if (count > 10)
+ if (count > 20)
+ result << Message(qal_minor, "Found " + stringify(count) +
+ " ebuilds, which is too many to count on both hands and both feet");
+ else if (count > 15)
+ result << Message(qal_minor, "Found " + stringify(count) +
+ " ebuilds, which is too many to count on both hands and one foot");
+ else if (count > 10)
result << Message(qal_minor, "Found " + stringify(count) +
" ebuilds, which is too many to count on my fingers");
diff --git a/paludis/qa/files_dir_size_check.cc b/paludis/qa/files_dir_size_check.cc
index 5948b24..d579e15 100644
--- a/paludis/qa/files_dir_size_check.cc
+++ b/paludis/qa/files_dir_size_check.cc
@@ -67,9 +67,13 @@ FilesDirSizeCheck::operator() (const FSEntry & d) const
SizeFinder f;
f(d / "files");
- if (f.total_size > (20 * 1024))
- result << Message(qal_minor, "files/ too bloated (" +
+ if (f.total_size > (100 * 1024))
+ result << Message(qal_minor, "files/ is way too bloated (" +
stringify(f.total_size / 1024) + "KBytes)");
+ else if (f.total_size > (20 * 1024))
+ result << Message(qal_minor, "files/ is oversized (" +
+ stringify(f.total_size / 1024) + "KBytes)");
+
return result;
}