mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-02-11 17:52:21 +00:00
fix(shell): add explicit return statements to functions
Add return 0 as the last statement in ~46 shell functions across 17 files that previously relied on implicit return codes (SonarCloud rule shelldre:S7682).
This commit is contained in:
@@ -33,6 +33,7 @@ install_packages()
|
||||
go install "$pkg"
|
||||
echo ""
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
# Function to install completions and run actions for selected packages
|
||||
@@ -44,6 +45,7 @@ post_install()
|
||||
git-profile completion zsh > "$ZSH_CUSTOM_COMPLETION_PATH/_git-profile" \
|
||||
&& msgr run_done "Installed completions for git-profile"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# Function to clear go cache
|
||||
@@ -51,6 +53,7 @@ clear_go_cache()
|
||||
{
|
||||
msgr run "Clearing go cache"
|
||||
go clean -cache -modcache
|
||||
return 0
|
||||
}
|
||||
|
||||
main()
|
||||
@@ -59,6 +62,7 @@ main()
|
||||
post_install
|
||||
clear_go_cache
|
||||
msgr run_done "Done"
|
||||
return 0
|
||||
}
|
||||
|
||||
main "$@"
|
||||
|
||||
Reference in New Issue
Block a user