Skip to content

Commit 107b0ca

Browse files
authored
Merge pull request #117 from arduino/per1234/add-tests
Add tests
2 parents 3e1d459 + 69ddf97 commit 107b0ca

File tree

66 files changed

+718
-7
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+718
-7
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)