summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Ullmann <jokey@gentoo.org>2006-11-02 21:18:20 +0000
committerMarkus Ullmann <jokey@gentoo.org>2006-11-02 21:18:20 +0000
commit3375619a55e9b46bfa979351c56f8f1c57999a60 (patch)
tree04a7a6c243d8c92ae6d26c3a73895a4675ffcf0f /scripts
parentSecond try :-) (diff)
downloadjokey-3375619a55e9b46bfa979351c56f8f1c57999a60.tar.gz
jokey-3375619a55e9b46bfa979351c56f8f1c57999a60.tar.bz2
jokey-3375619a55e9b46bfa979351c56f8f1c57999a60.zip
Improved QA script
svn path=/trunk/; revision=71
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/sunrise-qa.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/sunrise-qa.sh b/scripts/sunrise-qa.sh
index e0fa205..837ce37 100755
--- a/scripts/sunrise-qa.sh
+++ b/scripts/sunrise-qa.sh
@@ -1,14 +1,14 @@
#!/bin/bash
# a script to filter and sort pcheck dumps
-CHECKDIR=/usr/portage/local/layman/sunrise
+CHECKDIR=/home/jokey/gentoo/sunrise/sunrise
make_dump() {
today="$(date +%Y%m%d)-qa-check"
[[ -d ${today} ]] || mkdir ${today}
cd ${today}
echo "*** Running pcheck on ${CHECKDIR} - will take a while..."
- pcheck -d pkgcore_checks.unstable_only.UnstableOnlyReport -r /usr/portage ${CHECKDIR} &> dump
+ pcheck --disable=pkgcore_checks.unstable_only.UnstableOnlyReport -r /usr/portage ${CHECKDIR} &> dump
cp dump dump-unparsed
echo "Done!"
echo
@@ -206,6 +206,21 @@ vdb_hardcoded() {
find "${pdir}" -name '*.eclass' -o -name '*.ebuild' | xargs grep -H var/db/pkg | tee vdb_hardcoded.log >/dev/null 2>&1
}
+filter_whitespaces() {
+ local trailing="trailing whitespace"
+ local leading="leading whitespace"
+ local blankline="empty line"
+
+ echo "*** Filtering whitespace-related stuff..."
+ for whitespaces in "${trailing}" "${leading}" "${blankline}" ; do
+ grep "${whitespaces}" dump > "${whitespaces/ /_}".log
+ echo -e ""${whitespaces}"...\t `grep -c "${whitespaces}" dump` problem(s) found."
+ sed -i "/${whitespaces}/d" dump
+ done
+ echo "Done!"
+ echo
+}
+
filter_remaining() {
echo "*** Filtering remaining stuff"
local reversed="is reversed in"
@@ -243,6 +258,7 @@ filter_restrict
filter_vulnerable
filter_licenses
filter_digests
+filter_whitespaces
#vdb_hardcoded
filter_remaining
cleanup