[riot-notifications] [RIOT-OS/RIOT] dist/tools/buildsystem_sanity_check: add an export variable check (#11484)

Ga√ętan Harter notifications at github.com
Fri May 3 13:59:54 CEST 2019

### Contribution description

Check that some variables are not exported in the build system.
This should track variables that managed to not be exported anymore so
that they do not reappear in a BSP.

It is not a whitelist but just a way to keep things cleaned in the

### Testing procedure

No error when running the script as will CI check in `static-tests`.
No error when running `shellcheck` on the script.

Applying this diff will report a lot of errors as they are still exported.

diff --git a/dist/tools/buildsystem_sanity_check/check.sh b/dist/tools/buildsystem_sanity_check/check.sh
index e18ca6776..bd4071fd8 100755
--- a/dist/tools/buildsystem_sanity_check/check.sh
+++ b/dist/tools/buildsystem_sanity_check/check.sh
@@ -50,6 +50,8 @@ check_not_parsing_features() {
 check_not_exporting_variables() {
     local patterns=()
     local pathspec=()

I used `PORT` here on purpose as it may need to be more complicated to not match `PORT_LINUX` too. Even if `PORT_LINUX` should not be exported anyway but another `PORTSOMETHING` may need to.

### Issues/PRs references

Tracking: remove harmful use of `export` in make and immediate evaluation #10850 
Useful for https://github.com/RIOT-OS/RIOT/pull/10440
You can view, comment on, or merge this pull request online at:


-- Commit Summary --

  * dist/tools/buildsystem_sanity_check: add an export variable check

-- File Changes --

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

-- 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/20190503/973e2021/attachment.html>

More information about the notifications mailing list