question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cache rating: lint claims unused resources

See original GitHub issue

Describe your problem!

Recent builds claim a couple of lint messages about unused resources related to the cache rating feature. There are 22 messages regarding drawables (marker_rating_d_0.xml etc.), and another 11 regarding colors (marker_rating_0 etc.).

@ztNFny Can you cross-check whether any of those resources are actually used, remove unused resources and apply hints for lint to avoid any false positives?

How to reproduce?

see lint report of any recent builds

Actual result after these steps?

33 lint errors regarding “unused resources” related to the cache rating feature

Expected result after these steps?

no false lint positives regarding cache rating feature

Reproducible

Yes

c:geo Version

current master

System information

No response

Additional Information

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
eddiemuccommented, Jan 16, 2022

does it make sense to add code just to make a “stupid” program happy?

IMHO it doesn’t.

I checked into our existing lint.xml file, we already have a few ignore-entries for the UnusedResource warning:

image

I think the right way to go is to add these resources there as well. AFAI read on internet, regex may be used like this:

<ignore regexp="ga_trackingId|google_crash_reporting_api_key" />

0reactions
moving-bitscommented, Jan 16, 2022

Ok, if there is a better declarative way, then I would prefer to go that way. Thanks for reminding me of that way. I’ll dive into it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"File exists" errors when un-taring golangci-lint #244 - GitHub
Using v2, I'm still seeing these errors: - name: Lint uses: ... Here's a sample of the first two complaints:.
Read more >
Android Lint API Guide - Google Samples
This is for example how the ”unused resources“ check works: we store all the resource declarations and resource references we find in the...
Read more >
10 ideas to improve your Gradle build times [Part III] - Dipien
5. Remove unused dependencies. Having unused dependencies declared on your grade configuration files increases your build times. You can use the gradle-lint- ...
Read more >
Android Studio 2021.1.1 Closed Issues
Lint UnusedResources incorrectly fails when using ViewBinding via property delegation ... versionCode can break with configuration cache.
Read more >
Lint Error UnusedId is shown as false positive when we use ...
As a temporary solution to avoid build error, change the severity of the error to the warning in the lint.xml. <issue id="UnusedIds" ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found