[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 15:38:08 CEST 2019


cladmi commented on this pull request.



> @@ -41,11 +41,39 @@ check_not_parsing_features() {
     git -C "${RIOTBASE}" grep "${patterns[@]}" -- "${pathspec[@]}"
 }
 
+# Some variables do not need to be exported and even cause issues when being
+# exported because they are evaluated even when not needed.
+#
+# Currently this blacklists exported variables instead of whitelisting or
+# providing a mechanism for handling it.
+# It just keep things not exported anymore in the future.
+UNEXPORTED_VARIABLES=()
+UNEXPORTED_VARIABLES+=('FLASHFILE')
+UNEXPORTED_VARIABLES+=('TERMPROG' 'TERMFLAGS')
+check_not_exporting_variables() {
+    local patterns=()
+    local pathspec=()
+
+    for variable in "${UNEXPORTED_VARIABLES[@]}"; do
+        patterns+=(-e "export ${variable}")

I indeed forgot the `\+` and including all whitespaces is safer.
There should not be tabs but does not hurt.

It should be supported by every versions as it is `posix` regex.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/pull/11484#discussion_r280777348
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190503/31c38fcb/attachment.html>


More information about the notifications mailing list