mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-09-19 15:58:25 +00:00
tests: static checker: Create setup function
Move some of the common code into a setup function. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
@@ -330,8 +330,6 @@ static_check_go_arch_specific()
|
|||||||
# Install yamllint in the different Linux distributions
|
# Install yamllint in the different Linux distributions
|
||||||
install_yamllint()
|
install_yamllint()
|
||||||
{
|
{
|
||||||
source /etc/os-release || source /usr/lib/os-release
|
|
||||||
|
|
||||||
package="yamllint"
|
package="yamllint"
|
||||||
|
|
||||||
case "$ID" in
|
case "$ID" in
|
||||||
@@ -1399,9 +1397,16 @@ run_or_list_check_function()
|
|||||||
eval "$func"
|
eval "$func"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setup()
|
||||||
|
{
|
||||||
|
source /etc/os-release || source /usr/lib/os-release
|
||||||
|
|
||||||
|
trap remove_tmp_files EXIT
|
||||||
|
}
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
trap remove_tmp_files EXIT
|
setup
|
||||||
|
|
||||||
local long_option_names="${!long_options[@]}"
|
local long_option_names="${!long_options[@]}"
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user