Skip to content

fix(addons): improve addon validation [Dev-only]#21342

Open
david-allison wants to merge 10 commits into
ankidroid:mainfrom
david-allison:addons
Open

fix(addons): improve addon validation [Dev-only]#21342
david-allison wants to merge 10 commits into
ankidroid:mainfrom
david-allison:addons

Conversation

@david-allison

@david-allison david-allison commented Jul 5, 2026

Copy link
Copy Markdown
Member

Note

Assisted-by: Claude Fable 5

Purpose / Description

  • A number of addon validation mechanisms were inconsistent: throwing rather than returning.
  • We are now in Kotlin, so a sealed class makes sense
  • I want to move to a model where a state store defines each addon, so the individual keys for shared preferences are removed

How Has This Been Tested?

Test-only

Checklist

  • You have a descriptive commit message with a short title (first line, max 50 chars).
  • You have commented your code, particularly in hard-to-understand areas
  • You have performed a self-review of your own code
  • UI changes: include screenshots of all affected screens (in particular showing any new or changed strings)
  • UI Changes: You have tested your change using the Google Accessibility Scanner

Assisted-by: Claude Fable 5
Ensure the non-early return path works

Assisted-by: Claude Fable 5
AnkiDroid is standardizing licenses to SPDX.

Issue 20954

This change was not performed using LLMs and I have verified that it is
correct
Unused; to be replaced with per-addon state.

Assisted-By: Claude Fable 5
If we are reading multiple files, we want to be able to continue
 if one of many is invalid

Assisted-By: Claude Fable 5
inform callers that the extraction failed.

Assisted-By: Claude Fable 5
Assisted-By: Claude Fable 5
`File.parent` was never "addons".

Assisted-By: Claude Fable 5
@david-allison david-allison changed the title fix(addons): improve addon vaidation [Dev-only fix(addons): improve addon vaidation [Dev-only] Jul 5, 2026
@david-allison david-allison changed the title fix(addons): improve addon vaidation [Dev-only] fix(addons): improve addon validation [Dev-only] Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant