File: check_doc.sh

package info (click to toggle)
scip 10.0.1%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 76,156 kB
  • sloc: ansic: 716,600; cpp: 41,095; awk: 9,195; sh: 4,918; makefile: 4,044; python: 2,076; perl: 731; xml: 660; java: 314; php: 24; lisp: 15
file content (29 lines) | stat: -rwxr-xr-x 1,042 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#! /bin/bash

# filters doxygen documentation files for occurrences of unresolved references
#
# usage: check_doc.sh <DIRECTORYNAME>
#
# DIRECTORYNAME should be the root directory of doxygen-generated documentation, e.g., 'doc/html'

# get file list after excluding source files
FILELIST=`ls $1/*.* -a | grep "_source" -v`

# lists all files in directory which do not contain source in their name,
# but '@ref' in the file with their number of matches
GREPRESULT=`grep "@ref" -l $FILELIST | xargs grep "@ref" -cH`

# gives them out
for RESULT in ${GREPRESULT[@]}
do
    # check length of RESULT variable: If grep command finds no match, GREPRESULT is '0'
    if [ "${#RESULT}" -gt "2" ]
    then
        echo === Warning: unresolved references @ref in: $RESULT
    fi
done

# lists all files in directory which do not contain source in their name,
# but '@ref' in the file and classifies the unresolved references by their matching
echo === Classes of unresolved references:
echo `grep -hP "@ref [A-Za-z][^ .<>]*" -o $FILELIST | sort | uniq`