diff --git a/.gitignore b/.gitignore index 1171bf3c663..ac73c5a530d 100644 --- a/.gitignore +++ b/.gitignore @@ -31,6 +31,7 @@ sanity-out/ scripts/grub doc/reference/kconfig/CONFIG_* doc/reference/kconfig/index.rst +doc/doc.warnings tags .project .cproject diff --git a/doc/Makefile b/doc/Makefile index cefc765108b..8079b7bddc6 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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 diff --git a/doc/scripts/filter-doc-log.sh b/doc/scripts/filter-doc-log.sh index 1a7fe20a14e..22d562e26ad 100755 --- a/doc/scripts/filter-doc-log.sh +++ b/doc/scripts/filter-doc-log.sh @@ -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 " 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