script: add new check relus in merge_pre_check.pl script [1/1]
authorJianxiong Pan <jianxiong.pan@amlogic.com>
Wed, 17 Oct 2018 05:59:59 +0000 (13:59 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Wed, 17 Oct 2018 06:27:48 +0000 (23:27 -0700)
PD#174488

Problem:
add some new rules

Solution:
expand the scope of check

Verify:
p212

Change-Id: I4b5428367520456195645dbbce86c5f40411d59a
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
scripts/amlogic/merge_pre_check.pl

index e04be96..d4b107c 100755 (executable)
@@ -17,7 +17,7 @@ sub get_kernel_version
        close F;
        if( $line =~ /^VERSION = (\w)$/)
        {
-                       $k_v = $1;
+               $k_v = $1;
        }
        #print "$k_v\n";
 }
@@ -118,12 +118,11 @@ sub check_msg_49
 
        if( $lnum == 7 )
        {
-               if( $line !~ /^(\s){4}PD\#(\d)+/ &&
-                       $line !~ /^(\s){4}PD\#SWPL-(\d)+/ )
+               if( $line !~ /^(\s){4}PD\#/ )
                {
                        $err_cnt += 1;
                        $line =~ s/^(\s){4}//;
-                       $err_msg .= "    $err_cnt: <PD#xxxx/PD#SWPL-XXXX: detailed description>, but <$line>\n";
+                       $err_msg .= "    $err_cnt: <PD#XXXX: detailed description>, but <$line>\n";
                }
        }
 }
@@ -135,8 +134,7 @@ sub check_msg_314
 
        if( $lnum == 5 )
        {
-               if ($line !~ /^(\s){4}PD\#(\d)+:\s([\w]+:\s){1,2}[\w]+.*[\S]+$/
-       && $line !~ /^(\s){4}PD\#SWPL-(\d)+:\s([\w]+:\s){1,2}[\w]+.*[\S]+$/)
+               if ($line !~ /^(\s){4}PD\#(\w)+:\s([\w]+:\s){1,2}[\w]+.*[\S]+$/)
                {
                        $err_cnt += 1;
                        $line =~ s/^(\s){4}//;