doc: report which warnings/errors are new

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
Anas Nashif 2017-11-11 10:02:00 -05:00 committed by Anas Nashif
commit e754d44791
3 changed files with 19 additions and 4 deletions

1
.gitignore vendored
View file

@ -31,6 +31,7 @@ sanity-out/
scripts/grub
doc/reference/kconfig/CONFIG_*
doc/reference/kconfig/index.rst
doc/doc.warnings
tags
.project
.cproject

View file

@ -80,7 +80,7 @@ prep: doxy content kconfig
html: content kconfig
$(Q)$(SPHINXBUILD) -t $(DOC_TAG) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 2>&1 | tee doc.log;
$(Q)./scripts/filter-doc-log.sh doc.log > doc.warnings 2>&1;
$(Q)./scripts/filter-doc-log.sh doc.log
@rm -rf samples
@rm -rf boards

View file

@ -11,15 +11,29 @@ CONFIG_DIR=${ZEPHYR_BASE}/.known-issues/doc
LOG_FILE=$1
red='\E[31m'
green='\e[32m'
if [ -z "${LOG_FILE}" ]; then
echo "Error in $0: missing input parameter <logfile>"
exit 1
fi
if [ -e "${LOG_FILE}" ]; then
if [ -s "${LOG_FILE}" ]; then
$KI_SCRIPT --config-dir ${CONFIG_DIR} ${LOG_FILE}
if [ -s "${LOG_FILE}" ]; then
$KI_SCRIPT --config-dir ${CONFIG_DIR} ${LOG_FILE} > doc.warnings 2>&1
if [ -s doc.warnings ]; then
echo
echo -e "${red}New errors/warnings found, please fix them:"
echo -e "=============================================="
tput sgr0
echo
cat doc.warnings
echo
else
echo -e "${green}No new errors/warnings."
tput sgr0
fi
else
echo "Error in $0: logfile \"${LOG_FILE}\" not found."
exit 1