[riot-notifications] [RIOT-OS/RIOT] dist/tools/build_system_sanity_check: add reasons for each error type (#11672)

Gaƫtan Harter notifications at github.com
Tue Jun 11 12:24:20 CEST 2019

### Contribution description

Prepend the reason for the matched error pattern.
It will only add the reason if there is an error.

It currently requires using the `\\n` as using `errors += $(...)`
removes the last newline character. But it was a pattern used elsewhere
to cleaning it would be a separate task.

### Testing procedure

Run the script with the test commit and you should get the output with the justification.

Static-tests will fail with the test commit.

Invalid build system patterns found by ./dist/tools/buildsystem_sanity_check/check.sh:

Invalid use of FEATURES_ variables content:
makefiles/boot/riotboot.mk:ifneq (,$(filter riotboot,$(FEATURES_USED)))
makefiles/boot/riotboot.mk:endif # (,$(filter riotboot,$(FEATURES_USED)))
sys/Makefile.include:ifneq (,$(filter riotboot,$(FEATURES_USED)))
Variables must not be exported:
boards/pic32-clicker/Makefile.include:export APPDEPS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL)/$(CPU_MODEL).S
boards/pic32-wifire/Makefile.include:export APPDEPS += $(RIOTCPU)/$(CPU)/$(CPU_MODEL)/$(CPU_MODEL).S
makefiles/vars.inc.mk:export APPDEPS               # Files / Makefile targets that need to be created before the application can be build. Set in the application's Makefile.

Variables must only be exported in `makefiles/vars.inc.mk`:
Makefile.include:export CCACHE_CPP2=yes
makefiles/arch/mips.inc.mk:export CCAS = $(PREFIX)gcc
makefiles/arch/mips.inc.mk:export CCASUWFLAGS += -target $(TARGET_ARCH)
makefiles/toolchain/gnu.inc.mk:export CC         = $(PREFIX)gcc
makefiles/toolchain/gnu.inc.mk:export CCAS      ?= $(CC)
makefiles/toolchain/llvm.inc.mk:export CC          = clang
makefiles/toolchain/llvm.inc.mk:export CCAS       ?= $(CC)

Note: The usage of `FEATURES_USED` is correct but it was to trigger the error message

### Issues/PRs references

Split out of https://github.com/RIOT-OS/RIOT/pull/11671

You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * dist/tools/build_system_sanity_check: add reasons for each error type

-- File Changes --

    M dist/tools/buildsystem_sanity_check/check.sh (13)

-- Patch Links --


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190611/996bedee/attachment-0001.html>

More information about the notifications mailing list