pytorch/docs/cpp/check-doxygen.sh
Peter Goldsborough ed8849b640 Add include path to Doxygen preprocessing and add some documentation (#11313)
Summary:
1. Add documentation to Linear and improve documentation for RNNs
2. Fix preprocessing in C++ docs by adding correct include path
3. Make myself and ebetica codeowner of docs/cpp to improve development speed

ebetica ezyang soumith
Pull Request resolved: https://github.com/pytorch/pytorch/pull/11313

Differential Revision: D9683615

Pulled By: goldsborough

fbshipit-source-id: 84ea32f9ea6b4060744aabbf5db368776a30f0b5
2018-09-06 12:28:17 -07:00

35 lines
962 B
Bash
Executable File

#!/bin/bash
set -ex
ignore_warning() {
# Invert match to filter out $1.
grep -v "$1" doxygen-log.txt > temp.txt
mv temp.txt doxygen-log.txt
}
# Run doxygen and log all output.
doxygen 2> original-doxygen-log.txt
cp original-doxygen-log.txt doxygen-log.txt
echo "Original output"
cat original-doxygen-log.txt
# Filter out some warnings.
ignore_warning "warning: no uniquely matching class member found for"
ignore_warning "warning: source ../../build/aten/src/ is not a readable file"
ignore_warning "warning: source ../../build/aten/src/ATen/Tensor.h is not a readable file"
ignore_warning "warning: source ../../build/aten/src/ATen/Functions.h is not a readable file"
# Count the number of remaining warnings.
warnings=$(grep 'warning:' doxygen-log.txt | wc -l)
if [[ $warnings != 0 ]]; then
echo "Filtered output"
cat doxygen-log.txt
rm -f doxygen-log.txt original-doxygen-log.txt
exit 1
fi
rm -f doxygen-log.txt original-doxygen-log.txt