Skip to content

Resources used via Paraphrase are flagged as unused by lint #159

@theisenp

Description

@theisenp

If you're using Paraphrase then you may never reference a formatted string resource directly in your Kotlin code - you do it indirectly through the generated Paraphrase code. UnusedResourceDetector doesn't seem to pick up those indirect references, so it reports UnusedResources lint errors.

On one hand, a reference in the generated Paraphrase shouldn't automatically mark a resource is used. If the Paraphrase function is never called then the resource really is unused. But if the Paraphrase function is called, that would ideally be enough to satisfy lint.

I haven't looked into how UnusedResourceDetector works, so I'm not sure what options we have to mitigate this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions