Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to suppress the false positive typo warning for hex values in AndroidStudio/IntelliJ?

Sometimes hex values have enough alpha characters in them that the Inspections algorithm in Android Studio/Intellij mis-identifies them as typos. For example, it mis-identifies "dfab" in the following as a typo:

private static final String FOO = "6036aae7-9b4d-4ecd-a81f-dfab4b871039";

I generally find the typo checking helpful so I don't want to disable it completely. I also don't want to suppress typo checking for the file. Further, I do not want to add "dfab" to the dictionary because it is not a valid word and I want the spell checker to flag it in other contexts.

Is there any way to suppress the typo warning in Android Studio/IntelliJ in this situation?

like image 879
bartonstanley Avatar asked Aug 05 '15 14:08

bartonstanley


1 Answers

You can suppress the warning using annotation @SuppressWarnings("SpellCheckingInspection") for the field.

like image 62
anstarovoyt Avatar answered Sep 21 '22 23:09

anstarovoyt