Skip to content

Commit bef4ab2

Browse files
author
Roberto Sora
committed
add missing documentation temporary comment to make linter happy
this is a FIXME commit, in next months all the FIXMEDOCS placeholders must be replaced with proper documentation
1 parent 9116380 commit bef4ab2

28 files changed

+103
-1
lines changed

arduino/cores/packagemanager/loader.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
"github.com/arduino/arduino-cli/configs"
2828
"github.com/arduino/go-paths-helper"
2929
properties "github.com/arduino/go-properties-orderedmap"
30-
"go.bug.st/relaxed-semver"
30+
semver "go.bug.st/relaxed-semver"
3131
)
3232

3333
// LoadHardware read all plaforms from the configured paths
@@ -361,6 +361,7 @@ func (pm *PackageManager) loadToolReleasesFromTool(tool *cores.Tool, toolPath *p
361361
return nil
362362
}
363363

364+
// LoadToolsFromBundleDirectories FIXMEDOC
364365
func (pm *PackageManager) LoadToolsFromBundleDirectories(dirs paths.PathList) error {
365366
for _, dir := range dirs {
366367
if err := pm.LoadToolsFromBundleDirectory(dir); err != nil {
@@ -370,6 +371,7 @@ func (pm *PackageManager) LoadToolsFromBundleDirectories(dirs paths.PathList) er
370371
return nil
371372
}
372373

374+
// LoadToolsFromBundleDirectory FIXMEDOC
373375
func (pm *PackageManager) LoadToolsFromBundleDirectory(toolsPath *paths.Path) error {
374376
pm.Log.Infof("Loading tools from bundle dir: %s", toolsPath)
375377

arduino/cores/packagemanager/package_manager.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,17 @@ func NewPackageManager(indexDir, packagesDir, downloadDir, tempDir *paths.Path)
5959
}
6060
}
6161

62+
// Clear FIXMEDOC
6263
func (pm *PackageManager) Clear() {
6364
pm.packages = cores.NewPackages()
6465
}
6566

67+
// GetPackages FIXMEDOC
6668
func (pm *PackageManager) GetPackages() *cores.Packages {
6769
return pm.packages
6870
}
6971

72+
// FindPlatformReleaseProvidingBoardsWithVidPid FIXMEDOC
7073
func (pm *PackageManager) FindPlatformReleaseProvidingBoardsWithVidPid(vid, pid string) []*cores.PlatformRelease {
7174
res := []*cores.PlatformRelease{}
7275
for _, targetPackage := range pm.packages.Packages {
@@ -86,6 +89,7 @@ func (pm *PackageManager) FindPlatformReleaseProvidingBoardsWithVidPid(vid, pid
8689
return res
8790
}
8891

92+
// FindBoardsWithVidPid FIXMEDOC
8993
func (pm *PackageManager) FindBoardsWithVidPid(vid, pid string) []*cores.Board {
9094
res := []*cores.Board{}
9195
for _, targetPackage := range pm.packages.Packages {
@@ -102,6 +106,7 @@ func (pm *PackageManager) FindBoardsWithVidPid(vid, pid string) []*cores.Board {
102106
return res
103107
}
104108

109+
// FindBoardsWithID FIXMEDOC
105110
func (pm *PackageManager) FindBoardsWithID(id string) []*cores.Board {
106111
res := []*cores.Board{}
107112
for _, targetPackage := range pm.packages.Packages {
@@ -290,6 +295,7 @@ func (ta *ToolActions) IsInstalled() (bool, error) {
290295
return false, nil
291296
}
292297

298+
// Release FIXMEDOC
293299
func (ta *ToolActions) Release(version *semver.RelaxedVersion) *ToolReleaseActions {
294300
if ta.forwardError != nil {
295301
return &ToolReleaseActions{forwardError: ta.forwardError}
@@ -310,6 +316,7 @@ type ToolReleaseActions struct {
310316
forwardError error
311317
}
312318

319+
// Get FIXMEDOC
313320
func (tr *ToolReleaseActions) Get() (*cores.ToolRelease, error) {
314321
if tr.forwardError != nil {
315322
return nil, tr.forwardError
@@ -340,6 +347,7 @@ func (pm *PackageManager) GetInstalledPlatformRelease(platform *cores.Platform)
340347
return best
341348
}
342349

350+
// GetAllInstalledToolsReleases FIXMEDOC
343351
func (pm *PackageManager) GetAllInstalledToolsReleases() []*cores.ToolRelease {
344352
tools := []*cores.ToolRelease{}
345353
for _, targetPackage := range pm.packages.Packages {
@@ -384,6 +392,7 @@ func (pm *PackageManager) InstalledBoards() []*cores.Board {
384392
return boards
385393
}
386394

395+
// FindToolsRequiredForBoard FIXMEDOC
387396
func (pm *PackageManager) FindToolsRequiredForBoard(board *cores.Board) ([]*cores.ToolRelease, error) {
388397
pm.Log.Infof("Searching tools required for board %s", board)
389398

@@ -421,6 +430,7 @@ func (pm *PackageManager) FindToolsRequiredForBoard(board *cores.Board) ([]*core
421430
return requiredTools, nil
422431
}
423432

433+
// FindToolDependency FIXMEDOC
424434
func (pm *PackageManager) FindToolDependency(dep *cores.ToolDependency) *cores.ToolRelease {
425435
toolRelease, err := pm.Package(dep.ToolPackager).Tool(dep.ToolName).Release(dep.ToolVersion).Get()
426436
if err != nil {

arduino/libraries/libraries.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ import (
2626
semver "go.bug.st/relaxed-semver"
2727
)
2828

29+
// MandatoryProperties FIXMEDOC
2930
var MandatoryProperties = []string{"name", "version", "author", "maintainer"}
31+
32+
// OptionalProperties FIXMEDOC
3033
var OptionalProperties = []string{"sentence", "paragraph", "url"}
34+
35+
// ValidCategories FIXMEDOC
3136
var ValidCategories = map[string]bool{
3237
"Display": true,
3338
"Communication": true,

cli/cli.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ var appName = filepath.Base(os.Args[0])
5858
// VersionInfo contains all info injected during build
5959
var VersionInfo = version.NewInfo(appName)
6060

61+
// HTTPClientHeader is the object that will be propagated to configure the clients inside the downloaders
6162
var HTTPClientHeader = getHTTPClientHeader()
6263

6364
// ErrLogrus represents the logrus instance, which has the role to
@@ -70,6 +71,7 @@ var GlobalFlags struct {
7071
OutputJSON bool // true output in JSON, false output as Text
7172
}
7273

74+
// Config FIXMEDOC
7375
var Config *configs.Configuration
7476

7577
func packageManagerInitReq() *rpc.InitReq {
@@ -96,6 +98,7 @@ func getHTTPClientHeader() http.Header {
9698
return downloaderHeaders
9799
}
98100

101+
// InitInstance FIXMEDOC
99102
func InitInstance() *rpc.InitResp {
100103
logrus.Info("Initializing package manager")
101104
req := packageManagerInitReq()

commands/board/attach.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
paths "github.com/arduino/go-paths-helper"
3535
)
3636

37+
// Attach FIXMEDOC
3738
func Attach(ctx context.Context, req *rpc.BoardAttachReq, taskCB commands.TaskProgressCB) (*rpc.BoardAttachResp, error) {
3839

3940
pm := commands.GetPackageManager(req)

commands/board/details.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"github.com/arduino/arduino-cli/rpc"
2828
)
2929

30+
// Details FIXMEDOC
3031
func Details(ctx context.Context, req *rpc.BoardDetailsReq) (*rpc.BoardDetailsResp, error) {
3132
pm := commands.GetPackageManager(req)
3233
if pm == nil {

commands/board/list.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"github.com/arduino/arduino-cli/rpc"
2727
)
2828

29+
// List FIXMEDOC
2930
func List(ctx context.Context, req *rpc.BoardListReq) (*rpc.BoardListResp, error) {
3031
pm := commands.GetPackageManager(req)
3132
if pm == nil {

commands/board/listall.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"github.com/arduino/arduino-cli/rpc"
2727
)
2828

29+
// ListAll FIXMEDOC
2930
func ListAll(ctx context.Context, req *rpc.BoardListAllReq) (*rpc.BoardListAllResp, error) {
3031
pm := commands.GetPackageManager(req)
3132
if pm == nil {

commands/compile/compile.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ import (
4040
"github.com/sirupsen/logrus"
4141
)
4242

43+
// Compile FIXMEDOC
4344
func Compile(ctx context.Context, req *rpc.CompileReq, outStream io.Writer, errStream io.Writer) (*rpc.CompileResp, error) {
4445
pm := commands.GetPackageManager(req)
4546
if pm == nil {

commands/core/download.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"github.com/arduino/arduino-cli/rpc"
3030
)
3131

32+
// PlatformDownload FIXMEDOC
3233
func PlatformDownload(ctx context.Context, req *rpc.PlatformDownloadReq, downloadCB commands.DownloadProgressCB,
3334
downloaderHeaders http.Header) (*rpc.PlatformDownloadResp, error) {
3435
pm := commands.GetPackageManager(req)

commands/core/install.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"github.com/arduino/arduino-cli/rpc"
3030
)
3131

32+
// PlatformInstall FIXMEDOC
3233
func PlatformInstall(ctx context.Context, req *rpc.PlatformInstallReq,
3334
downloadCB commands.DownloadProgressCB, taskCB commands.TaskProgressCB, downloaderHeaders http.Header) (*rpc.PlatformInstallResp, error) {
3435

commands/core/list.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/arduino/arduino-cli/rpc"
2626
)
2727

28+
// PlatformList FIXMEDOC
2829
func PlatformList(ctx context.Context, req *rpc.PlatformListReq) (*rpc.PlatformListResp, error) {
2930
pm := commands.GetPackageManager(req)
3031
if pm == nil {

commands/core/search.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"github.com/arduino/arduino-cli/rpc"
2929
)
3030

31+
// PlatformSearch FIXMEDOC
3132
func PlatformSearch(ctx context.Context, req *rpc.PlatformSearchReq) (*rpc.PlatformSearchResp, error) {
3233
pm := commands.GetPackageManager(req)
3334
if pm == nil {

commands/core/uninstall.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"github.com/arduino/arduino-cli/rpc"
2929
)
3030

31+
// PlatformUninstall FIXMEDOC
3132
func PlatformUninstall(ctx context.Context, req *rpc.PlatformUninstallReq, taskCB commands.TaskProgressCB) (*rpc.PlatformUninstallResp, error) {
3233
pm := commands.GetPackageManager(req)
3334
if pm == nil {

commands/core/upgrade.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ import (
2828
"github.com/arduino/arduino-cli/rpc"
2929
)
3030

31+
// PlatformUpgrade FIXMEDOC
3132
func PlatformUpgrade(ctx context.Context, req *rpc.PlatformUpgradeReq,
3233
downloadCB commands.DownloadProgressCB, taskCB commands.TaskProgressCB, downloaderHeaders http.Header) (*rpc.PlatformUpgradeResp, error) {
3334

commands/instances.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,12 @@ type CoreInstance struct {
5555
discoveries []*discovery.Discovery
5656
}
5757

58+
// InstanceContainer FIXMEDOC
5859
type InstanceContainer interface {
5960
GetInstance() *rpc.Instance
6061
}
6162

63+
// GetPackageManager FIXMEDOC
6264
func GetPackageManager(req InstanceContainer) *packagemanager.PackageManager {
6365
i, ok := instances[req.GetInstance().GetId()]
6466
if !ok {
@@ -67,6 +69,7 @@ func GetPackageManager(req InstanceContainer) *packagemanager.PackageManager {
6769
return i.pm
6870
}
6971

72+
// GetLibraryManager FIXMEDOC
7073
func GetLibraryManager(req InstanceContainer) *librariesmanager.LibrariesManager {
7174
i, ok := instances[req.GetInstance().GetId()]
7275
if !ok {
@@ -75,6 +78,7 @@ func GetLibraryManager(req InstanceContainer) *librariesmanager.LibrariesManager
7578
return i.lm
7679
}
7780

81+
// GetDiscoveries FIXMEDOC
7882
func GetDiscoveries(req InstanceContainer) []*discovery.Discovery {
7983
i, ok := instances[req.GetInstance().GetId()]
8084
if !ok {
@@ -149,6 +153,7 @@ func (instance *CoreInstance) startDiscoveries() error {
149153
return nil
150154
}
151155

156+
// Init FIXMEDOC
152157
func Init(ctx context.Context, req *rpc.InitReq, downloadCB DownloadProgressCB, taskCB TaskProgressCB, downloaderHeaders http.Header) (*rpc.InitResp, error) {
153158
inConfig := req.GetConfiguration()
154159
if inConfig == nil {
@@ -202,6 +207,7 @@ func Init(ctx context.Context, req *rpc.InitReq, downloadCB DownloadProgressCB,
202207
}, nil
203208
}
204209

210+
// Destroy FIXMEDOC
205211
func Destroy(ctx context.Context, req *rpc.DestroyReq) (*rpc.DestroyResp, error) {
206212
id := req.GetInstance().GetId()
207213
if _, ok := instances[id]; !ok {
@@ -237,6 +243,7 @@ func UpdateLibrariesIndex(ctx context.Context, req *rpc.UpdateLibrariesIndexReq,
237243
return nil
238244
}
239245

246+
// UpdateIndex FIXMEDOC
240247
func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexReq, downloadCB DownloadProgressCB) (*rpc.UpdateIndexResp, error) {
241248
id := req.GetInstance().GetId()
242249
coreInstance, ok := instances[id]
@@ -286,6 +293,7 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexReq, downloadCB Downlo
286293
return &rpc.UpdateIndexResp{}, nil
287294
}
288295

296+
// Rescan FIXMEDOC
289297
func Rescan(ctx context.Context, req *rpc.RescanReq) (*rpc.RescanResp, error) {
290298
id := req.GetInstance().GetId()
291299
coreInstance, ok := instances[id]
@@ -371,6 +379,7 @@ func createInstance(ctx context.Context, config *configs.Configuration, getLibOn
371379
return pm, lm, platformIndexErrors, librariesIndexError, nil
372380
}
373381

382+
// Download FIXMEDOC
374383
func Download(d *downloader.Downloader, label string, downloadCB DownloadProgressCB) error {
375384
if d == nil {
376385
// This signal means that the file is already downloaded

commands/lib/download.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"github.com/sirupsen/logrus"
3030
)
3131

32+
// LibraryDownload FIXMEDOC
3233
func LibraryDownload(ctx context.Context, req *rpc.LibraryDownloadReq, downloadCB commands.DownloadProgressCB,
3334
downloaderHeaders http.Header) (*rpc.LibraryDownloadResp, error) {
3435
logrus.Info("Executing `arduino lib download`")

commands/lib/install.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import (
2929
"github.com/sirupsen/logrus"
3030
)
3131

32+
// LibraryInstall FIXMEDOC
3233
func LibraryInstall(ctx context.Context, req *rpc.LibraryInstallReq,
3334
downloadCB commands.DownloadProgressCB, taskCB commands.TaskProgressCB, downloaderHeaders http.Header) error {
3435

commands/lib/list.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ type installedLib struct {
3232
Available *librariesindex.Release
3333
}
3434

35+
// LibraryList FIXMEDOC
3536
func LibraryList(ctx context.Context, req *rpc.LibraryListReq) (*rpc.LibraryListResp, error) {
3637
lm := commands.GetLibraryManager(req)
3738

@@ -79,6 +80,7 @@ func listLibraries(lm *librariesmanager.LibrariesManager, updatable bool, all bo
7980
return res
8081
}
8182

83+
// GetOutputLibrary FIXMEDOC
8284
func GetOutputLibrary(lib *libraries.Library) *rpc.Library {
8385
insdir := ""
8486
if lib.InstallDir != nil {
@@ -123,6 +125,7 @@ func GetOutputLibrary(lib *libraries.Library) *rpc.Library {
123125
}
124126
}
125127

128+
// GetOutputRelease FIXMEDOC
126129
func GetOutputRelease(lib *librariesindex.Release) *rpc.LibraryRelease { //
127130
if lib != nil {
128131
return &rpc.LibraryRelease{

commands/lib/search.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"github.com/arduino/arduino-cli/rpc"
2828
)
2929

30+
// LibrarySearch FIXMEDOC
3031
func LibrarySearch(ctx context.Context, req *rpc.LibrarySearchReq) (*rpc.LibrarySearchResp, error) {
3132
lm := commands.GetLibraryManager(req)
3233
if lm == nil {
@@ -55,6 +56,7 @@ func LibrarySearch(ctx context.Context, req *rpc.LibrarySearchReq) (*rpc.Library
5556
return &rpc.LibrarySearchResp{Libraries: res}, nil
5657
}
5758

59+
// GetLibraryParameters FIXMEDOC
5860
func GetLibraryParameters(rel *librariesindex.Release) *rpc.LibraryRelease {
5961
return &rpc.LibraryRelease{
6062
Author: rel.Author,

commands/lib/uninstall.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/arduino/arduino-cli/rpc"
2626
)
2727

28+
// LibraryUninstall FIXMEDOC
2829
func LibraryUninstall(ctx context.Context, req *rpc.LibraryUninstallReq, taskCB commands.TaskProgressCB) error {
2930
lm := commands.GetLibraryManager(req)
3031

commands/lib/upgrade.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import (
2626
"github.com/arduino/arduino-cli/rpc"
2727
)
2828

29+
// LibraryUpgradeAll FIXMEDOC
2930
func LibraryUpgradeAll(ctx context.Context, req *rpc.LibraryUpgradeAllReq, downloadCB commands.DownloadProgressCB,
3031
taskCB commands.TaskProgressCB, downloaderHeaders http.Header) error {
3132
lm := commands.GetLibraryManager(req)

commands/upload/upload.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import (
3838
serial "go.bug.st/serial.v1"
3939
)
4040

41+
// Upload FIXMEDOC
4142
func Upload(ctx context.Context, req *rpc.UploadReq, outStream io.Writer, errStream io.Writer) (*rpc.UploadResp, error) {
4243
logrus.Info("Executing `arduino upload`")
4344

configs/navigate.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"github.com/sirupsen/logrus"
2323
)
2424

25+
// Navigate FIXMEDOC
2526
func (c *Configuration) Navigate(pwd *paths.Path) {
2627
parents := pwd.Clean().Parents()
2728

0 commit comments

Comments
 (0)