rm -rf scan-result-all

rm -rf features_old

rm -rf features_new

mkdir scan-result-all

mkdir features_old

mkdir features_new

cd features_old

Git clone –branch v2.18.0 git@*******

cd ..

cd mkdir features_new

Git clone –branch v2.18.1 git@******s

cd ..

array_name=(

Auth, User id component,1

IsShowAuth, user authorization pop-up judgment,0.5

UserService, get user information,1

HTTP, interface method encapsulation (validation signature, risk control),0.5

Apis, interface method configuration,0.5

NavigateTo, routing jump encapsulation,0.5

PagesConfig, page Configuration,1

FmPay, Payment Method Integration,1

BubbleTooltip, hint component,0.5

CitySelector, location select common component,1

Input, common component,0.5

Prompt, message prompt component,0.5

SlideInDialog, sidebar dialog box component,0.5

TipInfo, prompt message public method,0.5

TopNavigation, top bar TAB component,0.5

Uni-popup,uniApp’s official popup layer component,0.5

Uni-transition,uniApp’s official transition animation component,0.5

Auth, Public Method for User Identity Authentication,1

Risk, account risk control component,1

)

cat > ./scan-result-all/scan-result-all.html << EOF1

Common capability component code scan results

  • General ability
    instructions
    2.18.1 version
    Version 3.3.0
    Increase the quantity
    Forecast is
  • EOF1

    for element in ${array_name[@]}

    do

    arr=(${element//,/ })

    line1=${arr[0]}

    line2=${arr[1]}

    line3=${arr[2]}

    # times_old=` find ./features_old -type f \( -name “*.kt” -o -name “*.java” -o -name “*.xml” \) | xargs grep -e “$line1” | grep -v “import” | wc -l `

    # times_new=` find ./features_new -type f \( -name “*.kt” -o -name “*.java” -o -name “*.xml” \) | xargs grep -e “$line1” | grep -v “import” | wc -l `

    times_old=` find ./features_old -type f \( -name “*.*” \) | xargs grep -e “$line1” | grep -v “import” | wc -l `

    times_new=` find ./features_new -type f \( -name “*.*” \) | xargs grep -e “$line1” | grep -v “import” | wc -l `

    echo “


  • l i n e 1 < / d i v > < d i v c l a s s = d e s c > {line1}</div><div class=’desc’>
    {line2}

    t i m e s _ o l d < / d i v > < d i v > times\_old</div><div>
    times_new

    ( ( ((
    times_new –

    t i m e s _ o l d ) ) < / d i v > < d i v > times\_old))</div><div>
    {line3}
  • ” >> ./scan-result-all/scan-result-all.html

    done

    cat >> ./scan-result-all/scan-result-all.html << EOF2

Scan rule: full project, and import is not counted

EOF2