Skip to content

Commit

Permalink
appease golint
Browse files Browse the repository at this point in the history
  • Loading branch information
alessio-perugini committed Sep 6, 2023
1 parent 59ae920 commit 17669ca
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions arduino/builder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package builder

import "github.com/arduino/arduino-cli/arduino/sketch"

// nolint
const (
BuildPropertiesArchiveFile = "archive_file"
BuildPropertiesArchiveFilePath = "archive_file_path"
Expand Down
4 changes: 4 additions & 0 deletions arduino/builder/progress/progress.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package progress

// Struct fixdoc
type Struct struct {
Progress float32
StepAmount float32
Parent *Struct
}

// AddSubSteps fixdoc
func (p *Struct) AddSubSteps(steps int) {
p.Parent = &Struct{
Progress: p.Progress,
Expand All @@ -18,12 +20,14 @@ func (p *Struct) AddSubSteps(steps int) {
p.StepAmount /= float32(steps)
}

// RemoveSubSteps fixdoc
func (p *Struct) RemoveSubSteps() {
p.Progress = p.Parent.Progress
p.StepAmount = p.Parent.StepAmount
p.Parent = p.Parent.Parent
}

// CompleteStep fixdoc
func (p *Struct) CompleteStep() {
p.Progress += p.StepAmount
}
4 changes: 2 additions & 2 deletions arduino/builder/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ func FindFilesInFolder(dir *paths.Path, recurse bool, extensions ...string) (pat
return dir.ReadDir(fileFilter)
}

// nolint
const (
Ignore = 0 // Redirect to null
Show = 1 // Show on stdout/stderr as normal
Expand All @@ -207,9 +208,8 @@ func printableArgument(arg string) string {
arg = strings.ReplaceAll(arg, "\\", "\\\\")
arg = strings.ReplaceAll(arg, "\"", "\\\"")
return "\"" + arg + "\""
} else {
return arg
}
return arg
}

// Convert a command and argument slice back to a printable string.
Expand Down

0 comments on commit 17669ca

Please sign in to comment.