Skip to content

Add a lint rule for encodeToString/decodeFromString to detect if the value has Serializable annotation #3010

Closed as not planned
@TimoPtr

Description

@TimoPtr

What is your use-case and why do you need this feature?
The Home Assistant project is migrating to KotlinX serialization for JSON mostly. And while migrating we missed some spot where some classes where not annotated with @Serializable.
Describe the solution you'd like
We've made a very basic lint rule to detect if the field value of the method encodeToString or decodeFromString for the Json module. home-assistant/android#5368 it's not complete but it fits our usage. It would be nice to have something better and more robust.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions