Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit d718d3b

Browse files
committed
Fix bugs in library check functions
These bugs were exposed by the newly added tests.
1 parent c587712 commit d718d3b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎check/checkfunctions/library.go‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ func LibraryPropertiesEmailFieldStartsWithArduino() (result checkresult.Type, ou
787787
}
788788

789789
if checkdata.LibraryProperties().ContainsKey("maintainer") {
790-
return checkresult.NotRun, "Field not present"
790+
return checkresult.Skip, "No email alias field"
791791
}
792792

793793
email, ok := checkdata.LibraryProperties().GetOk("email")
@@ -890,7 +890,7 @@ func LibraryPropertiesCategoryFieldMissing() (result checkresult.Type, output st
890890
return checkresult.Skip, "Library has legacy format"
891891
}
892892

893-
if schema.RequiredPropertyMissing("category", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Specification]) {
893+
if schema.RequiredPropertyMissing("category", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Strict]) {
894894
return checkresult.Fail, ""
895895
}
896896
return checkresult.Pass, ""
@@ -1000,7 +1000,7 @@ func LibraryPropertiesArchitecturesFieldMissing() (result checkresult.Type, outp
10001000
return checkresult.Skip, "Library has legacy format"
10011001
}
10021002

1003-
if schema.RequiredPropertyMissing("architectures", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Specification]) {
1003+
if schema.RequiredPropertyMissing("architectures", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Strict]) {
10041004
return checkresult.Fail, ""
10051005
}
10061006
return checkresult.Pass, ""
@@ -1341,7 +1341,7 @@ func LibraryPropertiesMisspelledOptionalField() (result checkresult.Type, output
13411341
return checkresult.NotRun, "Library not loaded"
13421342
}
13431343

1344-
if schema.MisspelledOptionalPropertyFound(checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Specification]) {
1344+
if schema.MisspelledOptionalPropertyFound(checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Strict]) {
13451345
return checkresult.Fail, ""
13461346
}
13471347

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /