Skip to content

Commit 04378a3

Browse files
author
Mattia Bertorello
committed
Fixed all the problem reported by misspell
1 parent 48510ad commit 04378a3

File tree

12 files changed

+48
-49
lines changed

12 files changed

+48
-49
lines changed

.golangci.yml

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ linters:
3232
- maligned
3333
- megacheck
3434
- megacheck
35-
- misspell
3635
- nakedret
3736
- prealloc
3837
- unconvert

arduino/cores/packageindex/index.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ type indexToolRelease struct {
7272
Systems []indexToolReleaseFlavour `json:"systems,required"`
7373
}
7474

75-
// indexToolReleaseFlavour represents a single tool flavour in the package_index.json file.
75+
// indexToolReleaseFlavour represents a single tool flavor in the package_index.json file.
7676
type indexToolReleaseFlavour struct {
7777
OS string `json:"host,required"`
7878
URL string `json:"url,required"`
@@ -178,15 +178,15 @@ func (inToolRelease indexToolRelease) extractToolIn(outPackage *cores.Package) {
178178
outTool := outPackage.GetOrCreateTool(inToolRelease.Name)
179179

180180
outToolRelease := outTool.GetOrCreateRelease(inToolRelease.Version)
181-
outToolRelease.Flavours = inToolRelease.extractFlavours()
181+
outToolRelease.Flavors = inToolRelease.extractFlavours()
182182
}
183183

184-
// extractFlavours extracts a map[OS]Flavour object from an indexToolRelease entry.
185-
func (inToolRelease indexToolRelease) extractFlavours() []*cores.Flavour {
186-
ret := make([]*cores.Flavour, len(inToolRelease.Systems))
184+
// extractFlavours extracts a map[OS]Flavor object from an indexToolRelease entry.
185+
func (inToolRelease indexToolRelease) extractFlavours() []*cores.Flavor {
186+
ret := make([]*cores.Flavor, len(inToolRelease.Systems))
187187
for i, flavour := range inToolRelease.Systems {
188188
size, _ := flavour.Size.Int64()
189-
ret[i] = &cores.Flavour{
189+
ret[i] = &cores.Flavor{
190190
OS: flavour.OS,
191191
Resource: &resources.DownloadResource{
192192
ArchiveFileName: flavour.ArchiveFileName,

arduino/cores/tools.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ type Tool struct {
3737
// ToolRelease represents a single release of a tool
3838
type ToolRelease struct {
3939
Version *semver.RelaxedVersion `json:"version,required"` // The version number of this Release.
40-
Flavours []*Flavour `json:"systems"` // Maps OS to Flavour
40+
Flavors []*Flavor `json:"systems"` // Maps OS to Flavor
4141
Tool *Tool `json:"-"`
4242
InstallDir *paths.Path `json:"-"`
4343
}
4444

45-
// Flavour represents a flavour of a Tool version.
46-
type Flavour struct {
47-
OS string `json:"os,required"` // The OS Supported by this flavour.
45+
// Flavor represents a flavor of a Tool version.
46+
type Flavor struct {
47+
OS string `json:"os,required"` // The OS Supported by this flavor.
4848
Resource *resources.DownloadResource
4949
}
5050

@@ -150,11 +150,11 @@ var (
150150
regexpArmBSD = regexp.MustCompile("arm.*-freebsd[0-9]*")
151151
)
152152

153-
func (f *Flavour) isCompatibleWithCurrentMachine() bool {
153+
func (f *Flavor) isCompatibleWithCurrentMachine() bool {
154154
return f.isCompatibleWith(runtime.GOOS, runtime.GOARCH)
155155
}
156156

157-
func (f *Flavour) isCompatibleWith(osName, osArch string) bool {
157+
func (f *Flavor) isCompatibleWith(osName, osArch string) bool {
158158
if f.OS == "all" {
159159
return true
160160
}
@@ -183,7 +183,7 @@ func (f *Flavour) isCompatibleWith(osName, osArch string) bool {
183183

184184
// GetCompatibleFlavour returns the downloadable resource compatible with the running O.S.
185185
func (tr *ToolRelease) GetCompatibleFlavour() *resources.DownloadResource {
186-
for _, flavour := range tr.Flavours {
186+
for _, flavour := range tr.Flavors {
187187
if flavour.isCompatibleWithCurrentMachine() {
188188
return flavour.Resource
189189
}

arduino/cores/tools_test.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -52,28 +52,28 @@ func TestFlavorCompatibility(t *testing.T) {
5252
}
5353

5454
type test struct {
55-
Flavour *Flavour
55+
Flavour *Flavor
5656
Positives []*os
5757
}
5858
tests := []*test{
59-
&test{&Flavour{OS: "i686-mingw32"}, []*os{windowsi386, windowsx8664}},
60-
&test{&Flavour{OS: "i386-apple-darwin11"}, []*os{darwini386, darwinamd646}},
61-
&test{&Flavour{OS: "x86_64-apple-darwin"}, []*os{darwinamd646}},
59+
&test{&Flavor{OS: "i686-mingw32"}, []*os{windowsi386, windowsx8664}},
60+
&test{&Flavor{OS: "i386-apple-darwin11"}, []*os{darwini386, darwinamd646}},
61+
&test{&Flavor{OS: "x86_64-apple-darwin"}, []*os{darwinamd646}},
6262

6363
// Raspberry PI, BBB or other ARM based host
6464
// PI: "arm-linux-gnueabihf"
6565
// Raspbian on PI2: "arm-linux-gnueabihf"
6666
// Ubuntu Mate on PI2: "arm-linux-gnueabihf"
6767
// Debian 7.9 on BBB: "arm-linux-gnueabihf"
6868
// Raspbian on PI Zero: "arm-linux-gnueabihf"
69-
&test{&Flavour{OS: "arm-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
69+
&test{&Flavor{OS: "arm-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
7070
// Arch-linux on PI2: "armv7l-unknown-linux-gnueabihf"
71-
&test{&Flavour{OS: "armv7l-unknown-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
71+
&test{&Flavor{OS: "armv7l-unknown-linux-gnueabihf"}, []*os{linuxarm, linuxarmbe}},
7272

73-
&test{&Flavour{OS: "i686-linux-gnu"}, []*os{linuxi386}},
74-
&test{&Flavour{OS: "i686-pc-linux-gnu"}, []*os{linuxi386}},
75-
&test{&Flavour{OS: "x86_64-linux-gnu"}, []*os{linuxamd64}},
76-
&test{&Flavour{OS: "x86_64-pc-linux-gnu"}, []*os{linuxamd64}},
73+
&test{&Flavor{OS: "i686-linux-gnu"}, []*os{linuxi386}},
74+
&test{&Flavor{OS: "i686-pc-linux-gnu"}, []*os{linuxi386}},
75+
&test{&Flavor{OS: "x86_64-linux-gnu"}, []*os{linuxamd64}},
76+
&test{&Flavor{OS: "x86_64-pc-linux-gnu"}, []*os{linuxamd64}},
7777
}
7878

7979
check := func(test *test, os *os) {

arduino/libraries/libraries.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func (library *Library) IsOptimizedForArchitecture(arch string) bool {
108108
}
109109

110110
// IsArchitectureIndependent returns true if the library declares to be
111-
// compatibile with all architectures (the `architecture` field in
111+
// compatible with all architectures (the `architecture` field in
112112
// library.properties contains the `*` item)
113113
func (library *Library) IsArchitectureIndependent() bool {
114114
return library.IsOptimizedForArchitecture("*")

arduino/libraries/libraries_layout.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
"fmt"
2323
)
2424

25-
// LibraryLayout represents how the library source code is layed out in the library
25+
// LibraryLayout represents how the library source code is laid out in the library
2626
type LibraryLayout uint16
2727

2828
const (

arduino/libraries/librariesresolver/cpp.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ func computePriority(lib *libraries.Library, header, arch string) int {
106106
header = simplify(header)
107107
name := simplify(lib.Name)
108108

109-
priority := int(lib.PriorityForArchitecture(arch)) // bewteen 0..255
109+
priority := int(lib.PriorityForArchitecture(arch)) // between 0..255
110110
if name == header {
111111
priority += 0x500
112112
} else if name == header+"-master" {

builder_client_helpers/media_types.go

+13-13
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type ArduinoBuilderBoard struct {
3232
Architecture *string `form:"architecture,omitempty" json:"architecture,omitempty" xml:"architecture,omitempty"`
3333
Bootloader []*ArduinoBuilderBoardBootloader `form:"bootloader,omitempty" json:"bootloader,omitempty" xml:"bootloader,omitempty"`
3434
Build []*ArduinoBuilderBoardBuild `form:"build,omitempty" json:"build,omitempty" xml:"build,omitempty"`
35-
// The default flavour of the board
35+
// The default flavor of the board
3636
DefaultFlavour *string `form:"default_flavour,omitempty" json:"default_flavour,omitempty" xml:"default_flavour,omitempty"`
3737
// An identifier used by the tools to determine which tools to use on it
3838
Fqbn *string `form:"fqbn,omitempty" json:"fqbn,omitempty" xml:"fqbn,omitempty"`
@@ -62,7 +62,7 @@ func (c *Client) DecodeArduinoBuilderBoard(resp *http.Response) (*ArduinoBuilder
6262
type ArduinoBuilderBoardBootloader struct {
6363
// The commandline used to bootload
6464
Commandline *string `form:"commandline,omitempty" json:"commandline,omitempty" xml:"commandline,omitempty"`
65-
// The flavour of the board. Usually it's default
65+
// The flavor of the board. Usually it's default
6666
Flavour *string `form:"flavour,omitempty" json:"flavour,omitempty" xml:"flavour,omitempty"`
6767
// The signature of the commandline
6868
Signature *string `form:"signature,omitempty" json:"signature,omitempty" xml:"signature,omitempty"`
@@ -75,11 +75,11 @@ func (c *Client) DecodeArduinoBuilderBoardBootloader(resp *http.Response) (*Ardu
7575
return &decoded, err
7676
}
7777

78-
// ArduinoBuilderBoardBuild contains the info used to compile for a certain flavour of board. (default view)
78+
// ArduinoBuilderBoardBuild contains the info used to compile for a certain flavor of board. (default view)
7979
//
8080
// Identifier: application/vnd.arduino.builder.board.build; view=default
8181
type ArduinoBuilderBoardBuild struct {
82-
// The flavour of the board. Usually it's default
82+
// The flavor of the board. Usually it's default
8383
Flavour *string `form:"flavour,omitempty" json:"flavour,omitempty" xml:"flavour,omitempty"`
8484
// An identifier used by the tools to determine which tools to use on it
8585
Fqbn *string `form:"fqbn,omitempty" json:"fqbn,omitempty" xml:"fqbn,omitempty"`
@@ -92,7 +92,7 @@ func (c *Client) DecodeArduinoBuilderBoardBuild(resp *http.Response) (*ArduinoBu
9292
return &decoded, err
9393
}
9494

95-
// ArduinoBuilderBoardUpload contains the info used to upload a certain flavour of board. (default view)
95+
// ArduinoBuilderBoardUpload contains the info used to upload a certain flavor of board. (default view)
9696
//
9797
// Identifier: application/vnd.arduino.builder.board.upload; view=default
9898
type ArduinoBuilderBoardUpload struct {
@@ -102,7 +102,7 @@ type ArduinoBuilderBoardUpload struct {
102102
Ext *string `form:"ext,omitempty" json:"ext,omitempty" xml:"ext,omitempty"`
103103
// Files used by the programmer
104104
Files ArduinoBuilderFileCollection `form:"files,omitempty" json:"files,omitempty" xml:"files,omitempty"`
105-
// The flavour of the board. Usually it's default
105+
// The flavor of the board. Usually it's default
106106
Flavour *string `form:"flavour,omitempty" json:"flavour,omitempty" xml:"flavour,omitempty"`
107107
// Some options used for uploading, like the speed.
108108
Options map[string]string `form:"options,omitempty" json:"options,omitempty" xml:"options,omitempty"`
@@ -167,7 +167,7 @@ type ArduinoBuilderBoardv2 struct {
167167
// The architecture of the board
168168
Architecture *string `form:"architecture,omitempty" json:"architecture,omitempty" xml:"architecture,omitempty"`
169169
Build ArduinoBuilderBoardv2BuildCollection `form:"build,omitempty" json:"build,omitempty" xml:"build,omitempty"`
170-
// The default flavour of the board
170+
// The default flavor of the board
171171
DefaultFlavour *string `form:"default_flavour,omitempty" json:"default_flavour,omitempty" xml:"default_flavour,omitempty"`
172172
// An identifier used by the tools to determine which tools to use on it
173173
Fqbn *string `form:"fqbn,omitempty" json:"fqbn,omitempty" xml:"fqbn,omitempty"`
@@ -185,7 +185,7 @@ type ArduinoBuilderBoardv2Full struct {
185185
Architecture *string `form:"architecture,omitempty" json:"architecture,omitempty" xml:"architecture,omitempty"`
186186
Bootloader ArduinoBuilderBoardv2BootloaderCollection `form:"bootloader,omitempty" json:"bootloader,omitempty" xml:"bootloader,omitempty"`
187187
Build ArduinoBuilderBoardv2BuildCollection `form:"build,omitempty" json:"build,omitempty" xml:"build,omitempty"`
188-
// The default flavour of the board
188+
// The default flavor of the board
189189
DefaultFlavour *string `form:"default_flavour,omitempty" json:"default_flavour,omitempty" xml:"default_flavour,omitempty"`
190190
// An identifier used by the tools to determine which tools to use on it
191191
Fqbn *string `form:"fqbn,omitempty" json:"fqbn,omitempty" xml:"fqbn,omitempty"`
@@ -224,7 +224,7 @@ func (c *Client) DecodeArduinoBuilderBoardv2Full(resp *http.Response) (*ArduinoB
224224
type ArduinoBuilderBoardv2Bootloader struct {
225225
// The commandline used to bootload
226226
Commandline *string `form:"commandline,omitempty" json:"commandline,omitempty" xml:"commandline,omitempty"`
227-
// The flavour of the board. Usually it's default
227+
// The flavor of the board. Usually it's default
228228
Flavour *string `form:"flavour,omitempty" json:"flavour,omitempty" xml:"flavour,omitempty"`
229229
// The signature of the commandline
230230
Signature *string `form:"signature,omitempty" json:"signature,omitempty" xml:"signature,omitempty"`
@@ -249,11 +249,11 @@ func (c *Client) DecodeArduinoBuilderBoardv2BootloaderCollection(resp *http.Resp
249249
return decoded, err
250250
}
251251

252-
// Build contains the info used to compile for a certain flavour of board. (default view)
252+
// Build contains the info used to compile for a certain flavor of board. (default view)
253253
//
254254
// Identifier: application/vnd.arduino.builder.boardv2.build; view=default
255255
type ArduinoBuilderBoardv2Build struct {
256-
// The flavour of the board. Usually it's default
256+
// The flavor of the board. Usually it's default
257257
Flavour *string `form:"flavour,omitempty" json:"flavour,omitempty" xml:"flavour,omitempty"`
258258
// An identifier used by the tools to determine which tools to use on it
259259
Fqbn *string `form:"fqbn,omitempty" json:"fqbn,omitempty" xml:"fqbn,omitempty"`
@@ -278,7 +278,7 @@ func (c *Client) DecodeArduinoBuilderBoardv2BuildCollection(resp *http.Response)
278278
return decoded, err
279279
}
280280

281-
// ArduinoBuilderBoardv2Upload contains the info used to upload a certain flavour of board. (default view)
281+
// ArduinoBuilderBoardv2Upload contains the info used to upload a certain flavor of board. (default view)
282282
//
283283
// Identifier: application/vnd.arduino.builder.boardv2.upload; view=default
284284
type ArduinoBuilderBoardv2Upload struct {
@@ -288,7 +288,7 @@ type ArduinoBuilderBoardv2Upload struct {
288288
Ext *string `form:"ext,omitempty" json:"ext,omitempty" xml:"ext,omitempty"`
289289
// Files used by the programmer
290290
Files ArduinoBuilderFileCollection `form:"files,omitempty" json:"files,omitempty" xml:"files,omitempty"`
291-
// The flavour of the board. Usually it's default
291+
// The flavor of the board. Usually it's default
292292
Flavour *string `form:"flavour,omitempty" json:"flavour,omitempty" xml:"flavour,omitempty"`
293293
// Some options used for uploading, like the speed.
294294
Options map[string]string `form:"options,omitempty" json:"options,omitempty" xml:"options,omitempty"`

commands/board/attach.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func initAttachCommand() *cobra.Command {
5252
}
5353

5454
var attachFlags struct {
55-
boardFlavour string // The flavour of the chipset of the cpu of the connected board, if not specified it is set to "default".
55+
boardFlavour string // The flavor of the chipset of the cpu of the connected board, if not specified it is set to "default".
5656
searchTimeout string // Expressed in a parsable duration, is the timeout for the list and attach commands.
5757
}
5858

commands/compile/compile.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ var flags struct {
7070
buildProperties []string // List of custom build properties separated by commas. Or can be used multiple times for multiple properties.
7171
warnings string // Used to tell gcc which warning level to use.
7272
verbose bool // Turns on verbose mode.
73-
quiet bool // Supresses almost every output.
73+
quiet bool // Suppresses almost every output.
7474
vidPid string // VID/PID specific build properties.
7575
}
7676

commands/compile/ctags.go

+6-6
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
2828
builtinPackage := pm.GetPackages().GetOrCreatePackage("builtin")
2929
ctagsTool := builtinPackage.GetOrCreateTool("ctags")
3030
ctagsRel := ctagsTool.GetOrCreateRelease(semver.ParseRelaxed("5.8-arduino11"))
31-
ctagsRel.Flavours = []*cores.Flavour{
32-
&cores.Flavour{
31+
ctagsRel.Flavors = []*cores.Flavor{
32+
&cores.Flavor{
3333
OS: "i686-pc-linux-gnu",
3434
Resource: &resources.DownloadResource{
3535
ArchiveFileName: "ctags-5.8-arduino11-pm-i686-pc-linux-gnu.tar.bz2",
@@ -39,7 +39,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
3939
CachePath: "tools",
4040
},
4141
},
42-
&cores.Flavour{
42+
&cores.Flavor{
4343
OS: "x86_64-pc-linux-gnu",
4444
Resource: &resources.DownloadResource{
4545
ArchiveFileName: "ctags-5.8-arduino11-pm-x86_64-pc-linux-gnu.tar.bz2",
@@ -49,7 +49,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
4949
CachePath: "tools",
5050
},
5151
},
52-
&cores.Flavour{
52+
&cores.Flavor{
5353
OS: "i686-mingw32",
5454
Resource: &resources.DownloadResource{
5555
ArchiveFileName: "ctags-5.8-arduino11-pm-i686-mingw32.zip",
@@ -59,7 +59,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
5959
CachePath: "tools",
6060
},
6161
},
62-
&cores.Flavour{
62+
&cores.Flavor{
6363
OS: "x86_64-apple-darwin",
6464
Resource: &resources.DownloadResource{
6565
ArchiveFileName: "ctags-5.8-arduino11-pm-x86_64-apple-darwin.zip",
@@ -69,7 +69,7 @@ func loadBuiltinCtagsMetadata(pm *packagemanager.PackageManager) {
6969
CachePath: "tools",
7070
},
7171
},
72-
&cores.Flavour{
72+
&cores.Flavor{
7373
OS: "arm-linux-gnueabihf",
7474
Resource: &resources.DownloadResource{
7575
ArchiveFileName: "ctags-5.8-arduino11-pm-armv6-linux-gnueabihf.tar.bz2",

commands/core/download.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func downloadPlatformByRef(pm *packagemanager.PackageManager, platformsRef *pack
6060
os.Exit(commands.ErrBadCall)
6161
}
6262

63-
// Check if all tools have a flavour available for the current OS
63+
// Check if all tools have a flavor available for the current OS
6464
for _, tool := range tools {
6565
if tool.GetCompatibleFlavour() == nil {
6666
formatter.PrintErrorMessage("The tool " + tool.String() + " is not available for the current OS")

0 commit comments

Comments
 (0)