Skip to content

Commit 91f8639

Browse files
committed
Add reference link to library.properties-related error messages
A link to the documentation for this file will ensure that the library maintainer understands the problem and how to fix it.
1 parent 23a56c8 commit 91f8639

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

main.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -350,18 +350,18 @@ func populateSubmission(submissionURL string, listPath *paths.Path) (submissionT
350350
// Get submission library name. It is necessary to record this in the index source entry because the library is locked to this name.
351351
libraryPropertiesPath := submissionClonePath.Join("library.properties")
352352
if !libraryPropertiesPath.Exist() {
353-
submission.Error = "Library is missing a library.properties metadata file."
353+
submission.Error = "Library is missing a library.properties metadata file.%0A%0ASee: https://arduino.github.io/arduino-cli/latest/library-specification/#library-metadata"
354354
return submission, ""
355355
}
356356
libraryProperties, err := properties.LoadFromPath(libraryPropertiesPath)
357357
if err != nil {
358-
submission.Error = fmt.Sprintf("Invalid library.properties file (%s)", err)
358+
submission.Error = fmt.Sprintf("Invalid library.properties file: %s%%0A%%0ASee: https://arduino.github.io/arduino-cli/latest/library-specification/#library-metadata", err)
359359
return submission, ""
360360
}
361361
var ok bool
362362
submission.Name, ok = libraryProperties.GetOk("name")
363363
if !ok {
364-
submission.Error = "library.properties is missing a name field"
364+
submission.Error = "library.properties is missing a name field.%0A%0ASee: https://arduino.github.io/arduino-cli/latest/library-specification/#library-metadata"
365365
return submission, ""
366366
}
367367

test/test_all.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@
232232
"name": "",
233233
"official": True,
234234
"tag": "1.0.1",
235-
"error": "Library is missing a library.properties metadata file.",
235+
"error": "Library is missing a library.properties metadata file.%0A%0A"
236+
"See: https://arduino.github.io/arduino-cli/latest/library-specification/#library-metadata",
236237
}
237238
],
238239
"",

0 commit comments

Comments
 (0)