You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MessageTemplate: "missing required maintainer field in library.properties. See https://arduino.github.io/arduino-cli/latest/library-specification/#libraryproperties-file-format",
if checkdata.LibraryPropertiesLoadError() != nil {
323
+
return checkresult.NotRun, ""
324
+
}
325
+
326
+
if schema.RequiredPropertyMissing("maintainer", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Specification], configuration.SchemasPath()) {
327
+
return checkresult.Fail, ""
328
+
}
329
+
return checkresult.Pass, ""
330
+
}
331
+
332
+
// LibraryPropertiesMaintainerFieldLTMinLength checks if the library.properties "maintainer" value is less than the minimum length.
if checkdata.LibraryPropertiesLoadError() != nil {
335
+
return checkresult.NotRun, ""
336
+
}
337
+
338
+
if !checkdata.LibraryProperties().ContainsKey("maintainer") {
339
+
return checkresult.NotRun, ""
340
+
}
341
+
342
+
if schema.PropertyLessThanMinLength("maintainer", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Specification], configuration.SchemasPath()) {
343
+
return checkresult.Fail, ""
344
+
}
345
+
346
+
return checkresult.Pass, ""
347
+
}
348
+
349
+
// LibraryPropertiesMaintainerFieldStartsWithArduino checks if the library.properties "maintainer" value starts with "Arduino".
if checkdata.LibraryPropertiesLoadError() != nil {
352
+
return checkresult.NotRun, ""
353
+
}
354
+
355
+
maintainer, ok := checkdata.LibraryProperties().GetOk("maintainer")
356
+
if !ok {
357
+
return checkresult.NotRun, ""
358
+
}
359
+
360
+
if schema.ValidationErrorMatch("^#/maintainer$", "/patternObjects/notStartsWithArduino", "", "", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Specification], configuration.SchemasPath()) {
361
+
return checkresult.Fail, maintainer
362
+
}
363
+
364
+
return checkresult.Pass, ""
365
+
}
366
+
367
+
// LibraryPropertiesEmailFieldAsMaintainerAlias checks whether the library.properties "email" field is being used as an alias for the "maintainer" field.
if checkdata.LibraryPropertiesLoadError() != nil {
387
+
return checkresult.NotRun, ""
388
+
}
389
+
390
+
if checkdata.LibraryProperties().ContainsKey("maintainer") || !checkdata.LibraryProperties().ContainsKey("email") {
391
+
return checkresult.NotRun, ""
392
+
}
393
+
394
+
if schema.PropertyLessThanMinLength("email", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Specification], configuration.SchemasPath()) {
395
+
return checkresult.Fail, ""
396
+
}
397
+
398
+
return checkresult.Pass, ""
399
+
}
400
+
401
+
// LibraryPropertiesMaintainerFieldStartsWithArduino checks if the library.properties "email" value starts with "Arduino".
0 commit comments