Skip to content

Commit

Permalink
doc: report which warnings/errors are new
Browse files Browse the repository at this point in the history
Signed-off-by: Anas Nashif <[email protected]>
  • Loading branch information
nashif authored and Anas Nashif committed Nov 13, 2017
1 parent 89514de commit e754d44
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ sanity-out/
scripts/grub
doc/reference/kconfig/CONFIG_*
doc/reference/kconfig/index.rst
doc/doc.warnings
tags
.project
.cproject
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
20 changes: 17 additions & 3 deletions doc/scripts/filter-doc-log.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e754d44

Please sign in to comment.