Butterknife: New Lint: Unused binding

Created on 3 Apr 2017  路  4Comments  路  Source: JakeWharton/butterknife

When a @Bind* field is present but not used anywhere except by the generated view binding.

Help Wanted enhancement

Most helpful comment

Maybe @jrodbx is searching for a lint check to write for his talk next week...

All 4 comments

PMD or Findbugs is sometimes able to detect such fields. Although it isn't really reliable.

It's likely impossible to detect through normal static analysis since the field is referenced both on the constructor and unbinder methods and thus appears used.

The concepts from here could be applied and used when implementing this check.

Maybe @jrodbx is searching for a lint check to write for his talk next week...

Was this page helpful?
0 / 5 - 0 ratings