Skip to content

Commit 7fa7552

Browse files
committed
Restore normalization of library category metadata
When the code was switched to using Arduino Lint for release validation, the `metadata.Validate()` function was removed. At a closer look, it turns out that this function did normalization in addition to validation of the metadata. One such normalization was to restrict the `category` field value in the library metadata to the allowed values listed in the Arduino Library Specification, falling back to "Uncategorized" in the event the library has an unsupported value. Here, the category normalization is restored. Rather than using bespoke code to define the valid categories as before, the `github.com/arduino/arduino-cli/arduino/libraries` package is used, as in Arduino CLI. This will provide consistency and reduce maintenance burden.
1 parent 86ae556 commit 7fa7552

File tree

4 files changed

+330
-0
lines changed

4 files changed

+330
-0
lines changed

go.mod

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module arduino.cc/repository
33
go 1.14
44

55
require (
6+
github.com/arduino/arduino-cli v0.0.0-20210520100059-2666b6ec51e9
67
github.com/arduino/go-paths-helper v1.5.0
78
github.com/arduino/golang-concurrent-workers v0.0.0-20170202182617-6710cdc954bc
89
github.com/go-git/go-git/v5 v5.3.0

0 commit comments

Comments
 (0)