Skip to content

Commit 9b2719b

Browse files
author
Seeker04
committed
Added check for documentation comments to check_all.sh
1 parent 4b2fdfd commit 9b2719b

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

src/plwm.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@
460460
% @arg OnlyVisual whether to unfocus only visually
461461
unfocus_onlyvisual(OnlyVisual) :- active_mon_ws(ActMon, ActWs), unfocus_at_onlyvisual(ActMon-ActWs, OnlyVisual).
462462

463-
%! unfocus_onlyvisual(++At:integer-atom, ++OnlyVisual:bool) is det
463+
%! unfocus_at_onlyvisual(++At:integer-atom, ++OnlyVisual:bool) is det
464464
%
465465
% Unfocuses the active window on the target monitor-workspace.
466466
% This entails removing the focused status, adjusting the ActiveWindow netatom

tests/check_all.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,23 @@ echo "----------------------------------------------------------------------"
114114
make cppcheck
115115
make clang-tidy
116116

117+
echo
118+
echo "----------------------------------------------------------------------"
119+
echo "Checking documentation comments"
120+
echo "----------------------------------------------------------------------"
121+
122+
preds=$(egrep -h "^[a-z_]+[^_]\(.*\)(:-|.)" src/*.pl | cut -d'(' -f1 | sort -u | grep -vx "version")
123+
124+
# note: we ignore version/0 and local helpers suffixed with an underscore e.g. valid_set_/2
125+
126+
undocumented=""
127+
for pred in $preds; do
128+
grep -q "^%! $pred" src/*.pl || undocumented="$undocumented\n$pred"
129+
done
130+
131+
[ -z "$undocumented" ] && echo "documentation comments OK" \
132+
|| (echo -e "Predicates with no documentation comment:$undocumented"; false)
133+
117134
echo
118135
echo "----------------------------------------------------------------------"
119136
echo "Unit tests"

0 commit comments

Comments
 (0)