Code Review
/
releng
/
global-jjb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix coala warning
[releng/global-jjb.git]
/
ensure-documented.sh
diff --git
a/ensure-documented.sh
b/ensure-documented.sh
index
a2ca072
..
12d4927
100755
(executable)
--- a/
ensure-documented.sh
+++ b/
ensure-documented.sh
@@
-11,12
+11,11
@@
# Checks for JJB documentation interest points and ensures they are documented.
# Checks for JJB documentation interest points and ensures they are documented.
-
jjb_files=($(find jjb -name "*.yaml")
)
+
mapfile -t jjb_files < <(find jjb -name "*.yaml"
)
undocumented_count=0
for file in "${jjb_files[@]}"; do
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:' \
-e '\- job-template:' \
-e '\- parameter:' \
-e '\- property:' \
@@
-25,11
+24,12
@@
for file in "${jjb_files[@]}"; do
-e '\- trigger:' \
-e '\- wrapper:' \
-A1 "$file" \
-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 "'")
for item in "${docs_interests[@]}"; do
if ! grep -q "$item" "docs/${file//.yaml/.rst}"; then
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
let "undocumented_count++"
fi
done