thunderbird / addons-server

🕶 addons.thunderbird.net Django app and API, forked from addons.mozilla.org 🎉
https://addons.thunderbird.net
BSD 3-Clause "New" or "Revised" License
18 stars 17 forks source link

Update addons linter #212

Closed MelissaAutumn closed 1 year ago

MelissaAutumn commented 1 year ago

Update addons linter which should resolves #210.

I've tested new linter vs old linter (via the web validator) on some top addons.

Nothing too bad on the validation front, however there's some (our side) breaking changes to how the experimental api is handled.

By default you'll receive the error if you use the experimental api: image

This can be ignored with the new --privileged parameter, however this requires an additional mozillaAddons permission otherwise you'll receive: image

It also turns out you can't validate non-experiment addons with --privileged, so I've passed from parameters up from the parsed addon, to the validator functions to conditionally add the parameter.

We could probably shim in mozillaAddons permission automatically.

The contents of valid_webextension_with_good_version_string.xpi are just the manifest.json from #210 , and two empty dictionary files required by the manifest.

MelissaAutumn commented 1 year ago

After talking to John, we determined requiring the new permission might be problematic. The addons-linter seems pretty simple enough, I'd like to eventually fork it and add the Thunderbird schema, but that's way out of scope for this simple upgrade. So for now we just pop the errors off the validator response.

Without changes: image

With changes: image