Skip to content

Commit caeb1d3

Browse files
authored
Merge pull request #73 from arduino/per1234/fix-typos
Fix typos in comments and messages
2 parents 361afa1 + e4bfce3 commit caeb1d3

File tree

16 files changed

+31
-31
lines changed

16 files changed

+31
-31
lines changed

Diff for: check/check.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func RunChecks(project project.Type) {
4848
continue
4949
}
5050

51-
// Output will be printed after all checks are finished when configured for "json" output format
51+
// Output will be printed after all checks are finished when configured for "json" output format.
5252
feedback.Printf("Running check %s: ", checkConfiguration.ID)
5353

5454
checkResult, checkOutput := checkConfiguration.CheckFunction()

Diff for: check/check_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func Test_shouldRun(t *testing.T) {
4545
{"Disable mode default", projecttype.Library, projecttype.Library, []checkmode.Type{checkmode.Default}, []checkmode.Type{checkmode.LibraryManagerSubmission}, "update", "specification", assert.False, assert.NoError},
4646
{"Disable mode default override", projecttype.Library, projecttype.Library, []checkmode.Type{checkmode.Default}, []checkmode.Type{checkmode.LibraryManagerSubmission}, "submit", "specification", assert.True, assert.NoError},
4747
{"Enable mode default", projecttype.Library, projecttype.Library, []checkmode.Type{checkmode.LibraryManagerSubmission}, []checkmode.Type{checkmode.Default}, "update", "specification", assert.True, assert.NoError},
48-
{"Disable mode default override", projecttype.Library, projecttype.Library, []checkmode.Type{checkmode.LibraryManagerSubmission}, []checkmode.Type{checkmode.Default}, "submit", "specification", assert.False, assert.NoError},
48+
{"Enable mode default override", projecttype.Library, projecttype.Library, []checkmode.Type{checkmode.LibraryManagerSubmission}, []checkmode.Type{checkmode.Default}, "submit", "specification", assert.False, assert.NoError},
4949
{"Unable to resolve", projecttype.Library, projecttype.Library, []checkmode.Type{checkmode.LibraryManagerSubmission}, []checkmode.Type{checkmode.LibraryManagerIndexed}, "false", "specification", assert.False, assert.Error},
5050
}
5151

Diff for: check/checkconfigurations/checkconfigurations.go

+10-10
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ var configurations = []Type{
153153
ID: "",
154154
Brief: "name < min length",
155155
Description: "",
156-
MessageTemplate: "library.properties name value is less than minimum length",
156+
MessageTemplate: "library.properties name value is less than minimum length.",
157157
DisableModes: nil,
158158
EnableModes: []checkmode.Type{checkmode.All},
159159
InfoModes: nil,
@@ -168,7 +168,7 @@ var configurations = []Type{
168168
ID: "",
169169
Brief: "name > max length",
170170
Description: "",
171-
MessageTemplate: "library.properties name value {{.}} is longer than maximum length",
171+
MessageTemplate: "library.properties name value {{.}} is longer than maximum length.",
172172
DisableModes: nil,
173173
EnableModes: []checkmode.Type{checkmode.All},
174174
InfoModes: nil,
@@ -183,7 +183,7 @@ var configurations = []Type{
183183
ID: "",
184184
Brief: "name > recommended length",
185185
Description: "",
186-
MessageTemplate: "library.properties name value {{.}} is longer than recommended max length",
186+
MessageTemplate: "library.properties name value {{.}} is longer than recommended max length.",
187187
DisableModes: nil,
188188
EnableModes: []checkmode.Type{checkmode.All},
189189
InfoModes: nil,
@@ -227,7 +227,7 @@ var configurations = []Type{
227227
Subcategory: "name field",
228228
ID: "",
229229
Brief: `starts with "Arduino"`,
230-
Description: `Case insensitive. 3rd party libraries added to Library Manager index prior to the enactment of this rule are "grandfathered"`,
230+
Description: `Case insensitive. 3rd party libraries added to Library Manager index prior to the enactment of this rule are "grandfathered".`,
231231
MessageTemplate: `Library name {{.}} starts with "Arduino". These names are reserved for official libraries.`,
232232
DisableModes: []checkmode.Type{checkmode.Official},
233233
EnableModes: []checkmode.Type{checkmode.Default},
@@ -393,7 +393,7 @@ var configurations = []Type{
393393
ID: "",
394394
Brief: "author < min length",
395395
Description: "",
396-
MessageTemplate: "library.properties author value is less than minimum length",
396+
MessageTemplate: "library.properties author value is less than minimum length.",
397397
DisableModes: nil,
398398
EnableModes: []checkmode.Type{checkmode.All},
399399
InfoModes: nil,
@@ -423,7 +423,7 @@ var configurations = []Type{
423423
ID: "",
424424
Brief: "maintainer < min length",
425425
Description: "",
426-
MessageTemplate: "library.properties maintainer value is less than minimum length",
426+
MessageTemplate: "library.properties maintainer value is less than minimum length.",
427427
DisableModes: nil,
428428
EnableModes: []checkmode.Type{checkmode.All},
429429
InfoModes: nil,
@@ -468,7 +468,7 @@ var configurations = []Type{
468468
ID: "",
469469
Brief: "email < min length",
470470
Description: "",
471-
MessageTemplate: "library.properties email value is less than minimum length",
471+
MessageTemplate: "library.properties email value is less than minimum length.",
472472
DisableModes: nil,
473473
EnableModes: []checkmode.Type{checkmode.All},
474474
InfoModes: nil,
@@ -513,7 +513,7 @@ var configurations = []Type{
513513
ID: "",
514514
Brief: "sentence < min length",
515515
Description: "",
516-
MessageTemplate: "library.properties sentence value is less than minimum length",
516+
MessageTemplate: "library.properties sentence value is less than minimum length.",
517517
DisableModes: nil,
518518
EnableModes: []checkmode.Type{checkmode.All},
519519
InfoModes: nil,
@@ -1052,8 +1052,8 @@ var configurations = []Type{
10521052
Subcategory: "",
10531053
ID: "SS001",
10541054
Brief: ".pde extension",
1055-
Description: "The .pde extension is used by both Processing sketches and Arduino sketches. Processing sketches should either be in the \"data\" subfolder of the sketch or in the \"extras\" folder of the library. Arduino sketches should use the modern .ino extension",
1056-
MessageTemplate: "{{.}} uses deprecated .pde file extension. Use .ino for Arduino sketches",
1055+
Description: "The .pde extension is used by both Processing sketches and Arduino sketches. Processing sketches should either be in the \"data\" subfolder of the sketch or in the \"extras\" folder of the library. Arduino sketches should use the modern .ino extension.",
1056+
MessageTemplate: "{{.}} uses deprecated .pde file extension. Use .ino for Arduino sketches.",
10571057
DisableModes: nil,
10581058
EnableModes: []checkmode.Type{checkmode.All},
10591059
InfoModes: nil,

Diff for: check/checkdata/library.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func InitializeForLibrary(project project.Type, schemasPath *paths.Path) {
5858
}
5959
}
6060

61-
if libraryManagerIndex == nil { // Only download the Library Manager index once
61+
if libraryManagerIndex == nil { // Only download the Library Manager index once.
6262
url := "http://downloads.arduino.cc/libraries/library_index.json"
6363
httpResponse, err := http.Get(url)
6464
if err != nil {

Diff for: check/checkdata/schema/parsevalidationresult.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func ValidationErrorMatch(
6666
schemasPath *paths.Path,
6767
) bool {
6868
if validationResult == nil {
69-
// No error, so nothing to match
69+
// No error, so nothing to match.
7070
logrus.Trace("Schema validation passed. No match is possible.")
7171
return false
7272
}
@@ -140,7 +140,7 @@ func validationErrorSchemaPointerMatch(
140140
}
141141

142142
// The schema validator does not provide full pointer past logic inversion keywords to the lowest level keywords related to the validation error cause.
143-
// Therefore the sub-keywords must be checked for matches in order to be able to interpret the exact cause of the failure.
143+
// Therefore, the sub-keywords must be checked for matches in order to be able to interpret the exact cause of the failure.
144144
if regexp.MustCompile("(/not)|(/oneOf)$").MatchString(validationError.SchemaPtr) {
145145
return validationErrorSchemaSubPointerMatch(schemaPointerRegexp, validationError.SchemaPtr, validationErrorSchemaPointerValue(validationError, schemasPath))
146146
}

Diff for: check/checkdata/schema/schema.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func pathURI(path *paths.Path) string {
148148
return pathURI.String()
149149
}
150150

151-
// logValidationError logs the schema validation error data
151+
// logValidationError logs the schema validation error data.
152152
func logValidationError(validationError *jsonschema.ValidationError, schemasPath *paths.Path) {
153153
logrus.Trace("--------Schema validation failure cause--------")
154154
logrus.Tracef("Error message: %s", validationError.Error())

Diff for: check/checkfunctions/library.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ func LibraryPropertiesEmailFieldAsMaintainerAlias() (result checkresult.Type, ou
459459
return checkresult.Pass, ""
460460
}
461461

462-
// LibraryPropertiesNameFieldLTMinLength checks if the library.properties "email" value is less than the minimum length.
462+
// LibraryPropertiesEmailFieldLTMinLength checks if the library.properties "email" value is less than the minimum length.
463463
func LibraryPropertiesEmailFieldLTMinLength() (result checkresult.Type, output string) {
464464
if checkdata.LibraryPropertiesLoadError() != nil {
465465
return checkresult.NotRun, ""
@@ -476,7 +476,7 @@ func LibraryPropertiesEmailFieldLTMinLength() (result checkresult.Type, output s
476476
return checkresult.Pass, ""
477477
}
478478

479-
// LibraryPropertiesMaintainerFieldStartsWithArduino checks if the library.properties "email" value starts with "Arduino".
479+
// LibraryPropertiesEmailFieldStartsWithArduino checks if the library.properties "email" value starts with "Arduino".
480480
func LibraryPropertiesEmailFieldStartsWithArduino() (result checkresult.Type, output string) {
481481
if checkdata.LibraryPropertiesLoadError() != nil {
482482
return checkresult.NotRun, ""
@@ -682,7 +682,7 @@ func LibraryPropertiesArchitecturesFieldMissing() (result checkresult.Type, outp
682682
return checkresult.Pass, ""
683683
}
684684

685-
// LibraryPropertiesNameFieldLTMinLength checks if the library.properties "architectures" value is less than the minimum length.
685+
// LibraryPropertiesArchitecturesFieldLTMinLength checks if the library.properties "architectures" value is less than the minimum length.
686686
func LibraryPropertiesArchitecturesFieldLTMinLength() (result checkresult.Type, output string) {
687687
if checkdata.LibraryPropertiesLoadError() != nil {
688688
return checkresult.NotRun, ""
@@ -782,7 +782,7 @@ func LibraryPropertiesDotALinkageFieldTrueWithFlatLayout() (result checkresult.T
782782
return checkresult.Pass, ""
783783
}
784784

785-
// LibraryPropertiesNameFieldLTMinLength checks if the library.properties "includes" value is less than the minimum length.
785+
// LibraryPropertiesIncludesFieldLTMinLength checks if the library.properties "includes" value is less than the minimum length.
786786
func LibraryPropertiesIncludesFieldLTMinLength() (result checkresult.Type, output string) {
787787
if checkdata.LibraryPropertiesLoadError() != nil {
788788
return checkresult.NotRun, ""

Diff for: command/command.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import (
3030
"github.com/spf13/cobra"
3131
)
3232

33-
// arduinoCheck is the root command function.
33+
// ArduinoCheck is the root command function.
3434
func ArduinoCheck(rootCommand *cobra.Command, cliArguments []string) {
3535
if err := configuration.Initialize(rootCommand.Flags(), cliArguments); err != nil {
3636
feedback.Errorf("Configuration error: %v", err)

Diff for: configuration/configuration.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ func CheckModes(superprojectType projecttype.Type) map[checkmode.Type]bool {
150150

151151
var superprojectTypeFilter projecttype.Type
152152

153-
// SuperprojectType returns the superproject type filter configuration.
153+
// SuperprojectTypeFilter returns the superproject type filter configuration.
154154
func SuperprojectTypeFilter() projecttype.Type {
155155
return superprojectTypeFilter
156156
}

Diff for: configuration/defaults.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import (
2222
"github.com/arduino/arduino-check/project/projecttype"
2323
)
2424

25-
// Default check modes for each superproject type
26-
// Subprojects use the same check modes as the superproject
25+
// Default check modes for each superproject type.
26+
// Subprojects use the same check modes as the superproject.
2727
var defaultCheckModes = map[projecttype.Type]map[checkmode.Type]bool{
2828
projecttype.Sketch: {
2929
checkmode.Permissive: false,

Diff for: project/library/library.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ var examplesFolderSupportedNames = map[string]struct{}{
6161
"example": empty,
6262
}
6363

64-
// ExamplesFolderNames returns a slice of supported examples folder names
64+
// ExamplesFolderSupportedNames returns a slice of supported examples folder names
6565
func ExamplesFolderSupportedNames() []string {
6666
folderNames := make([]string, 0, len(examplesFolderSupportedNames))
6767
for folderName := range examplesFolderSupportedNames {

Diff for: project/platform/platform.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
// To purchase a commercial license, send an email to [email protected].
1515

1616
/*
17-
Package packageindex provides functions specific to checking Arduino boards platforms.
17+
Package platform provides functions specific to checking Arduino boards platforms.
1818
See: https://arduino.github.io/arduino-cli/latest/platform-specification/
1919
*/
2020
package platform

Diff for: project/project.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ func findSubprojects(superproject Type, apexSuperprojectType projecttype.Type) [
144144
panic(fmt.Sprintf("Subproject discovery not configured for project type: %s", superproject.ProjectType))
145145
}
146146

147-
// Search the subproject paths for projects
147+
// Search the subproject paths for projects.
148148
var immediateSubprojects []Type
149149
for _, subprojectFolderName := range subprojectFolderNames {
150150
subprojectPath := superproject.Path.Join(subprojectFolderName)
@@ -186,7 +186,7 @@ func isProject(potentialProjectPath *paths.Path, projectTypeFilter projecttype.T
186186
return true, projectType
187187
}
188188

189-
// isProject determines if a file is the indicator file for an Arduino project, and if so which type.
189+
// isProjectIndicatorFile determines if a file is the indicator file for an Arduino project, and if so which type.
190190
func isProjectIndicatorFile(potentialProjectFilePath *paths.Path, projectTypeFilter projecttype.Type) (bool, projecttype.Type) {
191191
logrus.Tracef("Checking if %s is %s indicator file", potentialProjectFilePath, projectTypeFilter)
192192

Diff for: project/projecttype/projecttype.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func FromString(projectTypeString string) (Type, error) {
5050
return Not, fmt.Errorf("No matching project type for string %s", projectTypeString)
5151
}
5252

53-
// Matches returns whether the receiver project type matches the argument project type
53+
// Matches returns whether the receiver project type matches the argument project type.
5454
func (projectTypeA Type) Matches(projectTypeB Type) bool {
5555
if projectTypeA == Not && projectTypeB == Not {
5656
return true

Diff for: result/outputformat/outputformat.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Arduino software without disclosing the source code of your own applications.
1414
// To purchase a commercial license, send an email to [email protected].
1515

16-
// Package projecttype defines the output formats
16+
// Package outputformat defines the output formats
1717
package outputformat
1818

1919
import (

Diff for: result/result.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func (results *Type) Record(checkedProject project.Type, checkConfiguration chec
138138
},
139139
)
140140
} else {
141-
// There's already a report for this project, just add the checks report to it
141+
// There's already a report for this project; just add the checks report to it.
142142
results.Projects[projectReportIndex].Checks = append(results.Projects[projectReportIndex].Checks, checkReport)
143143
}
144144

0 commit comments

Comments
 (0)