From 85527221ebbe312d6ba644e40af8a8cf3b6b67e9 Mon Sep 17 00:00:00 2001 From: Allen Winter Date: Thu, 7 May 2020 16:40:35 -0400 Subject: clazy.cmake - don't print level3 checker list level3 has been removed in v1.6 Differential Revision: https://phabricator.kde.org/D29348 --- clazy.cmake | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/clazy.cmake b/clazy.cmake index 16cd5f7a..ae0783ba 100644 --- a/clazy.cmake +++ b/clazy.cmake @@ -38,8 +38,13 @@ VERSION() { PRLIST() { echo "" - echo "Checks from level$1. $2:" - ls -1 $sharedir/doc/clazy/level$1/README* | awk -F/ '{printf(" %s\n", $NF)}' | sed s/README-// | sed s/\.md$// | sort + if ( test -d "$sharedir/doc/clazy/level$1" ) + then + echo "Checks from level$1. $2:" + ls -1 $sharedir/doc/clazy/level$1/README* | awk -F/ '{printf(" %s\n", $NF)}' | sed s/README-// | sed s/\.md$// | sort + else + echo "There are no checkers available for level$1" + fi } PRINFO() { @@ -79,7 +84,7 @@ then PRLIST 0 "Very stable checks, 100% safe, no false-positives" PRLIST 1 "Mostly stable and safe, rare false-positives" PRLIST 2 "Sometimes has false-positives (20-30%)" - PRLIST 3 "Not always correct, high rate of false-positives" + #PRLIST 3 "Not always correct, high rate of false-positives" exit fi -- cgit v1.2.3