-
Notifications
You must be signed in to change notification settings - Fork 932
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add doxygen-check pre-commit hook (#11076)
- Adds doxygen-check pre-commit hook (verbose) - doxygen-check passes with warning if doxygen is not present - doxygen-check passes with warning if supported doxygen version 1.8.20 to 1.9.1 is not present - doxygen-check fails if any warning or error is thrown by doxygen - since pre-commit runs as part of style check, it's removed from _style.sh_ - updated Doxyfile configuration to work with versions 1.8.20 to 1.9.1 - added doxygen=1.8.20 to conda dev environment - mentioned doxygen.sh in CONTRIBUTING.md guide Related to #9373 (Add Doxygen CI check) Authors: - Karthikeyan (https://github.com/karthikeyann) Approvers: - Bradley Dice (https://github.com/bdice) - Yunsong Wang (https://github.com/PointKernel) - AJ Schmidt (https://github.com/ajschmidt8) URL: #11076
- Loading branch information
1 parent
0fe5d2d
commit ff1f9d3
Showing
6 changed files
with
93 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#!/bin/bash | ||
# Copyright (c) 2022, NVIDIA CORPORATION. | ||
############################### | ||
# cuDF doxygen warnings check # | ||
############################### | ||
|
||
# skip if doxygen is not installed | ||
if ! [ -x "$(command -v doxygen)" ]; then | ||
echo -e "warning: doxygen is not installed" | ||
exit 0 | ||
fi | ||
|
||
# Utility to return version as number for comparison | ||
function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; } | ||
|
||
# doxygen supported version 1.8.20 to 1.9.1 | ||
DOXYGEN_VERSION=`doxygen --version` | ||
if [ $(version "$DOXYGEN_VERSION") -lt $(version "1.8.20") ] || [ $(version $DOXYGEN_VERSION) -gt $(version "1.9.1") ]; then | ||
echo -e "warning: Unsupported doxygen version $DOXYGEN_VERSION" | ||
echo -e "Expecting doxygen version from 1.8.20 to 1.9.1" | ||
exit 0 | ||
fi | ||
|
||
# Run doxygen, ignore missing tag files error | ||
TAG_ERROR1="error: Tag file '.*.tag' does not exist or is not a file. Skipping it..." | ||
TAG_ERROR2="error: cannot open tag file .*.tag for writing" | ||
DOXYGEN_STDERR=`cd cpp/doxygen && { cat Doxyfile ; echo QUIET = YES; echo GENERATE_HTML = NO; } | doxygen - 2>&1 | sed "/\($TAG_ERROR1\|$TAG_ERROR2\)/d"` | ||
RETVAL=$? | ||
|
||
if [ "$RETVAL" != "0" ] || [ ! -z "$DOXYGEN_STDERR" ]; then | ||
echo -e "$DOXYGEN_STDERR" | ||
RETVAL=1 #because return value is not generated by doxygen 1.8.20 | ||
fi | ||
|
||
exit $RETVAL |
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