1 Star 0 Fork 0

Espressif Systems/esp-dsp

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
check_doc_warnings.sh 1.50 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
#
# Check for Documentation warnings:
# doxygen-warning-log.txt should be an empty file
# sphinx-warning-log.txt should only contain (fuzzy) matches to ../sphinx-known-warnings.txt
RESULT=0
STARS='***************************************************'
if [ -s doxygen-warning-log.txt ]; then
echo "$STARS"
echo "Build failed due to doxygen warnings:"
cat doxygen-warning-log.txt
echo "$STARS"
RESULT=1
fi
SED=sed
os_name=`uname -s`
if [[ "${os_name}" == "Darwin" ]]; then
SED=gsed
fi
# Remove escape characters, file paths, line numbers from
# the Sphinx warning log
# (escape char removal from https://www.commandlinefu.com/commands/view/6141/remove-color-codes-special-characters-with-sed
${SED} -r 's:\x1B\[[0-9;]*[mK]::g' sphinx-warning-log.txt | \
${SED} -E "s~${IDF_PATH}~\${IDF_PATH}~" | \
${SED} -E "s/:[0-9]+:/:line:/" > sphinx-warning-log-sanitized.txt
# diff sanitized warnings, ignoring lines which only appear in ../sphinx-known-warnings.txt
# format is to display only lines new or changed in second argument
DIFF_FORMAT="--unchanged-line-format= --old-line-format= --new-line-format=%L"
SPHINX_WARNINGS=$(diff $DIFF_FORMAT sphinx-known-warnings.txt sphinx-warning-log-sanitized.txt)
if ! [ -z "$SPHINX_WARNINGS" ]; then
echo "$STARS"
echo "Build failed due to new/different Sphinx warnings:"
echo "$SPHINX_WARNINGS"
echo "$STARS"
RESULT=1
echo "(Check files sphinx-known-warnings.txt and sphinx-warning-log.txt for full details.)"
fi
exit $RESULT
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/espressif-systems/esp-dsp.git
git@gitee.com:espressif-systems/esp-dsp.git
espressif-systems
esp-dsp
esp-dsp
master

搜索帮助