|
95 | 95 |
|
96 | 96 | echo "" >> "$OUTPUT_FILE" |
97 | 97 |
|
| 98 | +# Empty Param Descriptions |
| 99 | +echo "## Empty Param Descriptions" >> "$OUTPUT_FILE" |
| 100 | +echo "" >> "$OUTPUT_FILE" |
| 101 | +echo "Hooks with \`@param\` tags that have an empty description." >> "$OUTPUT_FILE" |
| 102 | +echo "" >> "$OUTPUT_FILE" |
| 103 | + |
| 104 | +EMPTY_PARAM_DESC_ACTIONS=$(jq -r '.hooks[] | .name as $name | .file as $file | .doc.tags[] | select(.name == "param" and (.content == "" or .content == null)) | "- `\($name)` — \(.variable) (\($file))"' hooks/actions.json 2>/dev/null | sort -u) |
| 105 | +EMPTY_PARAM_DESC_FILTERS=$(jq -r '.hooks[] | .name as $name | .file as $file | .doc.tags[] | select(.name == "param" and (.content == "" or .content == null)) | "- `\($name)` — \(.variable) (\($file))"' hooks/filters.json 2>/dev/null | sort -u) |
| 106 | + |
| 107 | +EMPTY_PARAM_DESC=$(echo -e "${EMPTY_PARAM_DESC_ACTIONS}\n${EMPTY_PARAM_DESC_FILTERS}" | grep -v '^$' | sort -u) |
| 108 | + |
| 109 | +if [ -n "$EMPTY_PARAM_DESC" ]; then |
| 110 | + echo "$EMPTY_PARAM_DESC" >> "$OUTPUT_FILE" |
| 111 | +else |
| 112 | + echo "_No hooks with empty param descriptions._" >> "$OUTPUT_FILE" |
| 113 | +fi |
| 114 | + |
| 115 | +echo "" >> "$OUTPUT_FILE" |
| 116 | + |
| 117 | +# Missing Original Since |
| 118 | +echo "## Missing Original Since" >> "$OUTPUT_FILE" |
| 119 | +echo "" >> "$OUTPUT_FILE" |
| 120 | +echo "Hooks where all \`@since\` tags have descriptions, indicating the original version is missing." >> "$OUTPUT_FILE" |
| 121 | +echo "" >> "$OUTPUT_FILE" |
| 122 | + |
| 123 | +# Exclude hooks with @since MU (3.0.0) as this indicates the original multisite version |
| 124 | +MISSING_ORIG_SINCE_ACTIONS=$(jq -r '.hooks[] | select((.doc.tags | map(select(.name == "since" and .description == "MU (3.0.0)")) | length == 0) and (.doc.tags | map(select(.name == "since")) | length > 0) and (.doc.tags | map(select(.name == "since" and (.description == null or .description == ""))) | length == 0)) | "- `\(.name)` (\(.file))"' hooks/actions.json 2>/dev/null | sort -u) |
| 125 | +MISSING_ORIG_SINCE_FILTERS=$(jq -r '.hooks[] | select((.doc.tags | map(select(.name == "since" and .description == "MU (3.0.0)")) | length == 0) and (.doc.tags | map(select(.name == "since")) | length > 0) and (.doc.tags | map(select(.name == "since" and (.description == null or .description == ""))) | length == 0)) | "- `\(.name)` (\(.file))"' hooks/filters.json 2>/dev/null | sort -u) |
| 126 | + |
| 127 | +MISSING_ORIG_SINCE=$(echo -e "${MISSING_ORIG_SINCE_ACTIONS}\n${MISSING_ORIG_SINCE_FILTERS}" | grep -v '^$' | sort -u) |
| 128 | + |
| 129 | +if [ -n "$MISSING_ORIG_SINCE" ]; then |
| 130 | + echo "$MISSING_ORIG_SINCE" >> "$OUTPUT_FILE" |
| 131 | +else |
| 132 | + echo "_No hooks with missing original since version._" >> "$OUTPUT_FILE" |
| 133 | +fi |
| 134 | + |
| 135 | +echo "" >> "$OUTPUT_FILE" |
| 136 | + |
98 | 137 | # Param Count Mismatches |
99 | 138 | echo "## Param Count Mismatches" >> "$OUTPUT_FILE" |
100 | 139 | echo "" >> "$OUTPUT_FILE" |
|
0 commit comments