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:
parent
a68f78bb10
commit
7d65a715ca
18
dist/tools/buildsystem_sanity_check/check.sh
vendored
18
dist/tools/buildsystem_sanity_check/check.sh
vendored
@ -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() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user