From 7d65a715cad2bfeedb3f3d57b502f1d6442bf2e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Tue, 11 Jun 2019 11:59:26 +0200 Subject: [PATCH] dist/tools/build_system_sanity_check: deprecate FEATURES_MCU_GROUP Add a function to list deprecated variables or patterns and use it for * FEATURES_MCU_GROUP --- dist/tools/buildsystem_sanity_check/check.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/dist/tools/buildsystem_sanity_check/check.sh b/dist/tools/buildsystem_sanity_check/check.sh index 551b131793..1b4403f2c4 100755 --- a/dist/tools/buildsystem_sanity_check/check.sh +++ b/dist/tools/buildsystem_sanity_check/check.sh @@ -108,6 +108,23 @@ check_not_exporting_variables() { fi } +# Deprecated variables or patterns +# Prevent deprecated variables or patterns to re-appear after cleanup +check_deprecated_vars_patterns() { + local patterns=() + local pathspec=() + + patterns+=(-e 'FEATURES_MCU_GROUP') + + # Pathspec with exclude should start by an inclusive pathspec in git 2.7.4 + pathspec+=('*') + + # Ignore this file when matching as it self matches + pathspec+=(":!${SCRIPT_PATH}") + + git -C "${RIOTBASE}" grep "${patterns[@]}" -- "${pathspec[@]}" \ + | error_with_message 'Deprecated variables or patterns:' +} error_on_input() { grep '' && return 1 @@ -116,6 +133,7 @@ error_on_input() { all_checks() { check_not_parsing_features check_not_exporting_variables + check_deprecated_vars_patterns } main() {