X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=blobdiff_plain;f=ensure-documented.sh;h=928abdb73c6897cc98cd74cc0e3550afb9b9ea23;hb=refs%2Fheads%2Fv0.48.x;hp=cab15fcb485c976e3e8cc65efd90628a4561c99b;hpb=bb5e0da850b1c5ed31cf76af62d91b506c13d8dd;p=releng%2Fglobal-jjb.git diff --git a/ensure-documented.sh b/ensure-documented.sh index cab15fcb..928abdb7 100755 --- a/ensure-documented.sh +++ b/ensure-documented.sh @@ -15,8 +15,7 @@ mapfile -t jjb_files < <(find jjb -name "*.yaml") undocumented_count=0 for file in "${jjb_files[@]}"; do - docs_interests=$(grep -e '\- builder:' \ - -e '\- job-group:' \ + mapfile -t docs_interests < <(grep -e '\- builder:' \ -e '\- job-template:' \ -e '\- parameter:' \ -e '\- property:' \ @@ -25,11 +24,12 @@ for file in "${jjb_files[@]}"; do -e '\- trigger:' \ -e '\- wrapper:' \ -A1 "$file" \ - | grep 'name: ' | awk -F': ' '{print $2}' | awk -F"'" '{print $2}' | sort | uniq) + | grep 'name: ' | awk -F': ' '{print $2}' | sort | uniq \ + | tr -d "'" | tr -d '"') for item in "${docs_interests[@]}"; do if ! grep -q "$item" "docs/${file//.yaml/.rst}"; then - echo "$item" + echo "$file:$item" let "undocumented_count++" fi done