Commit 0561a765 authored by Mattia Bertorello's avatar Mattia Bertorello

Fixed all the problem reported by ineffassign ( ineffectual assignment)

parent b5cab6ec
......@@ -25,7 +25,6 @@ linters:
- goconst
- gocyclo
- govet
- ineffassign
- interfacer
- lll
- maligned
......
......@@ -206,8 +206,10 @@ func TestUserLibs(t *testing.T) {
func TestLibDownloadAndInstall(t *testing.T) {
defer makeTempDataDir(t)()
defer makeTempSketchbookDir(t)()
var d []byte
var exitCode int
exitCode, d := executeWithArgs(t, "core", "update-index")
exitCode, _ = executeWithArgs(t, "core", "update-index")
require.Zero(t, exitCode, "exit code")
// Download inexistent
......
......@@ -106,7 +106,7 @@ func run(cmd *cobra.Command, args []string) {
// Check for ctags tool
loadBuiltinCtagsMetadata(pm)
ctags, err := getBuiltinCtagsTool(pm)
ctags, _ := getBuiltinCtagsTool(pm)
if !ctags.IsInstalled() {
formatter.Print("Downloading and installing missing tool: " + ctags.String())
core.DownloadToolRelease(pm, ctags)
......@@ -116,7 +116,7 @@ func run(cmd *cobra.Command, args []string) {
formatter.PrintError(err, "Could not load hardware packages.")
os.Exit(commands.ErrCoreConfig)
}
ctags, err = getBuiltinCtagsTool(pm)
ctags, _ = getBuiltinCtagsTool(pm)
if !ctags.IsInstalled() {
formatter.PrintErrorMessage("Missing ctags tool.")
os.Exit(commands.ErrCoreConfig)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment