Infinum Android Talks #04 - Android Lint

444 views

Published on

Android lint tool is a static code analysis tool that checks your Android project source files for potential bugs and optimization improvements for correctness, security, performance, usability, accessibility, and internationalization.

I'll show few examples and suggestions how we can use it to make application development more enjoyable.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
444
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Infinum Android Talks #04 - Android Lint

  1. 1. Android lint Nikola Kapraljević nixa
  2. 2. Static code analysis tool that checks your Android project source files.
  3. 3. lint • introduced in ADT 16 (and Tools 16)! • scans Android project sources for potential bugs! • available as! • command line tool! • integrated with Android Studio
  4. 4. Code scanning workflow
  5. 5. $ gradle lint
  6. 6. errors
  7. 7. no errors
  8. 8. android studio doesn’t use lint.xml
  9. 9. command line demo
  10. 10. Android Studio
  11. 11. Android Studio integration
  12. 12. configuring checks
  13. 13. Suppress problems
  14. 14. available checks • $ lint —show! • lists all available checks! • http://tools.android.com/tips/lint-checks
  15. 15. my favorites • StringFormatMatches - Ensures that the format used in <string> definitions is compatible with the String.format call! • MissingTranslation - Checks for incomplete translations where not all strings are translated! • ExtraTranslation - Checks for translations that appear to be unused! • SpUsage - Looks for uses of dp instead of sp dimensions for text sizes! • UnusedResources - Looks for unused resources! • HardcodedText - Looks for hardcoded text attributes which should be converted to resource lookup
  16. 16. links • http://tools.android.com/tips/lint! • http://developer.android.com/tools/help/lint.html
  17. 17. Thank you.

×