Skip to content

Add tests #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions check/checkfunctions/library.go
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ func LibraryPropertiesEmailFieldStartsWithArduino() (result checkresult.Type, ou
}

if checkdata.LibraryProperties().ContainsKey("maintainer") {
return checkresult.NotRun, "Field not present"
return checkresult.Skip, "No email alias field"
}

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

if schema.RequiredPropertyMissing("category", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Specification]) {
if schema.RequiredPropertyMissing("category", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Strict]) {
return checkresult.Fail, ""
}
return checkresult.Pass, ""
Expand Down Expand Up @@ -1000,7 +1000,7 @@ func LibraryPropertiesArchitecturesFieldMissing() (result checkresult.Type, outp
return checkresult.Skip, "Library has legacy format"
}

if schema.RequiredPropertyMissing("architectures", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Specification]) {
if schema.RequiredPropertyMissing("architectures", checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Strict]) {
return checkresult.Fail, ""
}
return checkresult.Pass, ""
Expand Down Expand Up @@ -1341,7 +1341,7 @@ func LibraryPropertiesMisspelledOptionalField() (result checkresult.Type, output
return checkresult.NotRun, "Library not loaded"
}

if schema.MisspelledOptionalPropertyFound(checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Specification]) {
if schema.MisspelledOptionalPropertyFound(checkdata.LibraryPropertiesSchemaValidationResult()[compliancelevel.Strict]) {
return checkresult.Fail, ""
}

Expand Down
Loading