-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New script to create documentation and report warnings (disregard exc…
…eptions) - fix #266 (comment) - addressing #266 - new script `tools/run_doxygen.sh` - new make targets: "doc" and "doc_clean" - continuous integration: travis-ci will now use the new script which fails on warnings, but disregards exceptions that are documented in the new file `doc/doxygen_exceptions.txt` - currently, there is one known exception, see #267 - moved `Doxyfile` to `doc/` (addressing #89)
- Loading branch information
Showing
7 changed files
with
72 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
warning: Unexpected html tag <img> found within <a href=...> context |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
|
||
# Create documentation using doxygen and report any errors/warnings except | ||
# those warnings/errors listed as exceptions (doc/doxygen_exceptions.txt) | ||
|
||
doc_path="doc" # path to documentation | ||
doxy=${doc_path}"/Doxyfile" # Doxyfile | ||
log=${doc_path}"/log_doxygen.log" # logfile for doxygen output | ||
log_tmp=${doc_path}"/log_doxygen_tmp.log" | ||
doxexcept=${doc_path}"/doxygen_exceptions.txt" # filename that lists exceptions (one per line) | ||
|
||
|
||
# Don't use set if run locally, e.g., with `make doc` | ||
if [ ${CI} ]; then | ||
set -ev | ||
# The -e flag causes the script to exit as soon as one command returns a non-zero exit code | ||
# The -v flag makes the shell print all lines in the script before executing them | ||
fi | ||
|
||
# Downgrade Doxyfile in case this runs an old doxygen version, e.g., | ||
# travis-ci is currently on 1.8.6 (instead of 1.8.15) | ||
if [[ $(doxygen --version) != "1.8.15" ]] | ||
then | ||
doxygen -u ${doxy} &>/dev/null | ||
fi | ||
|
||
# Run doxygen and pipe all output to a log file | ||
doxygen ${doxy} > ${log} 2>&1 | ||
|
||
# Eliminate warnings/errors that are known exceptions | ||
# Make sure that there is such a (readable) file | ||
if [ -r ${doxexcept} ]; then | ||
# Make sure that there are exceptions in the file | ||
if [ $(wc -l < ${doxexcept}) -ne 0 ]; then | ||
# Remove exceptions from the logfile | ||
grep -v -f ${doxexcept} ${log} > ${log_tmp} | ||
mv ${log_tmp} ${log} | ||
rm -f ${log_tmp} | ||
fi | ||
fi | ||
|
||
|
||
# Examine log file for remaining warnings/errors | ||
warnings=$(grep "warning\|error" ${log}) | ||
|
||
if [ -n "${warnings}" ]; then | ||
echo ${warnings} | ||
fi |