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
This commit is contained in:
Gaëtan Harter 2019-06-11 11:59:26 +02:00 committed by Alexandre Abadie
parent a68f78bb10
commit 7d65a715ca
No known key found for this signature in database
GPG Key ID: 1C919A403CAE1405

View File

@ -108,6 +108,23 @@ check_not_exporting_variables() {
fi 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() { error_on_input() {
grep '' && return 1 grep '' && return 1
@ -116,6 +133,7 @@ error_on_input() {
all_checks() { all_checks() {
check_not_parsing_features check_not_parsing_features
check_not_exporting_variables check_not_exporting_variables
check_deprecated_vars_patterns
} }
main() { main() {