summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-24 20:41:16 +0000
committerglighta <glighta@54d463be-8e91-2dee-dedb-b68131a5f0ec>2012-11-24 20:41:16 +0000
commit0c899a3bf5715095687ec30f1cae09cabee863e6 (patch)
tree91a819698d3e24b1b7046c9a32554c8d16e92515 /tools
parent1f91ca9379c7127fe2e0020c2c7f4e771839de22 (diff)
downloadhercules-0c899a3bf5715095687ec30f1cae09cabee863e6.tar.gz
hercules-0c899a3bf5715095687ec30f1cae09cabee863e6.tar.bz2
hercules-0c899a3bf5715095687ec30f1cae09cabee863e6.tar.xz
hercules-0c899a3bf5715095687ec30f1cae09cabee863e6.zip
-Add tool/check-doc to verify if all script/atcommand are being documented. thx to Trojal
-Upd SC_ASH, make skill fail at 50% rate git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16964 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'tools')
-rwxr-xr-xtools/check-doc28
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/check-doc b/tools/check-doc
new file mode 100755
index 000000000..4e8d036e8
--- /dev/null
+++ b/tools/check-doc
@@ -0,0 +1,28 @@
+#!/bin/sh
+# checking-doc script by trojal
+# modified by lighta
+
+case $1 in
+ 'script')
+ #find which script commands are missing from doc/script_commands.txt
+ echo "Missing scipt documentation for function :"
+ awk '/BUILDIN_DEF\(.*\),/ {b=match($0,"BUILDIN_DEF(.*),");c=match($0,",");print substr($0,b+12,c-b-12);}' ../src/map/script.c | xargs -I{} sh -c '! grep -Lq {} ../doc/script_commands.txt && echo {}'
+ awk '/BUILDIN_DEF2\(.*\),/ {b=match($0,"BUILDIN_DEF2(.*),");c=match($0,",");d=match($0 ,"\",\"");print substr($0,c+2,d-c-2);}' ../src/map/script.c | xargs -I{} sh -c '! grep -Lq {} ../doc/script_commands.txt && echo {}'
+ ;;
+
+ 'atc')
+ #find which atcommands are missing from doc/atcommands.txt
+ echo "Missing atcommand documentation for function :"
+ awk '/ACMD_DEF\(.*\),/ {b=match($0,"ACMD_DEF(.*),");c=match($0,",");print substr($0,b+9,c-b-10);}' ../src/map/atcommand.c | xargs -I{} sh -c '! grep -Lq {} ../doc/atcommands.txt && echo {}'
+ awk '/ACMD_DEF2\(.*\),/ {b=match($0,"ACMD_DEF2(.*),");c=match($0,",");print substr($0,b+10,c-b-10);}' ../src/map/atcommand.c | xargs -I{} sh -c '! grep -Lq {} ../doc/atcommands.txt && echo {}'
+ ;;
+ 'both')
+ $0 script
+ $0 atc
+ ;;
+
+ *)
+ echo "Usage: check-doc { script | atc | both }"
+ ;;
+esac
+