Search code examples
androidandroid-lint

In Jetbrain IDEs, How to show warnings on method parameter hover?


In Android studio, If we write a log tag of more than 23 characters, it shows an underlined warning saying tag can't be more than 23 characters (pic for ref).

enter image description here

If we want to do something similar to our own method (maybe while writing a new library), How can we achieve that?


Solution

  • If you want checks not covered by current release of lint, then you need to to write own rules. There's sample repo on github with sample custom rules: https://github.com/googlesamples/android-custom-lint-rules