Skip to content
This repository was archived by the owner on Jul 16, 2023. It is now read-only.
This repository was archived by the owner on Jul 16, 2023. It is now read-only.

[New Analyzer] Ability to check for unused assets #816

Open
@AbhishekDoshi26

Description

@AbhishekDoshi26

Summary

So one of the main reasons for increased app size is assets. While developing, we constantly keep on adding some images or fonts that our client wants and when it changes, we forget to remove the unused assets.
This analyzer (not linter rule) would provide the list of all the assets that we have not used in the project.

Possible Solution

  • Fetch the list of assets available in pubspec.yaml or assets folder (if the developer has simply imported assets/).
  • Search for the relative path or file name in the entire project to find its usage.
  • If the developer has used asset generation packages, we can check for the unused asset variables.

What category of rule is this? (place an "X" next to just one item)

[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[x] Other (please specify:)

Are you willing to submit a pull request to implement this rule? I don't have much idea about how to write the script but if guided, definitely!

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions