diff --git a/arduino/builder/compilation/database.go b/arduino/builder/compilation/database.go index 81ea3daeb6f..f6a6b1ab5f0 100644 --- a/arduino/builder/compilation/database.go +++ b/arduino/builder/compilation/database.go @@ -29,12 +29,12 @@ var tr = i18n.Tr // Database keeps track of all the compile commands run by the builder type Database struct { - Contents []CompilationCommand + Contents []Command File *paths.Path } -// CompilationCommand keeps track of a single run of a compile command -type CompilationCommand struct { +// Command keeps track of a single run of a compile command +type Command struct { Directory string `json:"directory"` Command string `json:"command,omitempty"` Arguments []string `json:"arguments,omitempty"` @@ -45,7 +45,7 @@ type CompilationCommand struct { func NewDatabase(filename *paths.Path) *Database { return &Database{ File: filename, - Contents: []CompilationCommand{}, + Contents: []Command{}, } } @@ -83,7 +83,7 @@ func (db *Database) Add(target *paths.Path, command *executils.Process) { commandDir = dir } - entry := CompilationCommand{ + entry := Command{ Directory: commandDir, Arguments: command.GetArgs(), File: target.String(), diff --git a/arduino/builder/core.go b/arduino/builder/core.go index 5568a877640..9bec697cb96 100644 --- a/arduino/builder/core.go +++ b/arduino/builder/core.go @@ -41,6 +41,7 @@ func (b *Builder) CoreBuildCachePath() *paths.Path { return b.coreBuildCachePath } +// CoreBuilder fixdoc func CoreBuilder( buildPath, coreBuildPath, coreBuildCachePath *paths.Path, buildProperties *properties.Map, diff --git a/arduino/builder/libraries.go b/arduino/builder/libraries.go index 3565c608276..af2e899840d 100644 --- a/arduino/builder/libraries.go +++ b/arduino/builder/libraries.go @@ -31,9 +31,13 @@ import ( "github.com/pkg/errors" ) -var FLOAT_ABI_CFLAG = "float-abi" -var FPU_CFLAG = "fpu" +// nolint +var ( + FloatAbiCflag = "float-abi" + FpuCflag = "fpu" +) +// LibrariesBuilder fixdoc func LibrariesBuilder( librariesBuildPath *paths.Path, buildProperties *properties.Map, @@ -87,7 +91,7 @@ func findExpectedPrecompiledLibFolder( command, _ := utils.PrepareCommandForRecipe(buildProperties, "recipe.cpp.o.pattern", true) fpuSpecs := "" for _, el := range command.GetArgs() { - if strings.Contains(el, FPU_CFLAG) { + if strings.Contains(el, FpuCflag) { toAdd := strings.Split(el, "=") if len(toAdd) > 1 { fpuSpecs += strings.TrimSpace(toAdd[1]) + "-" @@ -96,7 +100,7 @@ func findExpectedPrecompiledLibFolder( } } for _, el := range command.GetArgs() { - if strings.Contains(el, FLOAT_ABI_CFLAG) { + if strings.Contains(el, FloatAbiCflag) { toAdd := strings.Split(el, "=") if len(toAdd) > 1 { fpuSpecs += strings.TrimSpace(toAdd[1]) + "-" diff --git a/arduino/builder/linker.go b/arduino/builder/linker.go index 0082e1008b3..528e159d0aa 100644 --- a/arduino/builder/linker.go +++ b/arduino/builder/linker.go @@ -27,6 +27,7 @@ import ( "github.com/pkg/errors" ) +// Linker fixdoc func Linker( onlyUpdateCompilationDatabase bool, sketchObjectFiles, librariesObjectFiles, coreObjectsFiles paths.PathList, diff --git a/arduino/builder/sketch.go b/arduino/builder/sketch.go index 4e78bc58cf2..79779d5b4cc 100644 --- a/arduino/builder/sketch.go +++ b/arduino/builder/sketch.go @@ -179,6 +179,7 @@ func writeIfDifferent(source []byte, destPath *paths.Path) error { return nil } +// SketchBuilder fixdoc func SketchBuilder( sketchBuildPath *paths.Path, buildProperties *properties.Map,