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

Sometimes hexadecimal values ​​have enough alpha characters in them that Android Studio / Intellij's Inspections algorithm will incorrectly identify them as typos. For example, it incorrectly identifies "dfab" as follows:

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

      

I usually find typo checking useful, so I don't want to disable it entirely. I also don't want to suppress typo checking for the file. Also, I don't want to add the words "dfab" to the dictionary because it is the wrong word and I want the spell checker to mean it in other contexts.

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

+3


source to share


1 answer


You can suppress the warning by using annotation @SuppressWarnings("SpellCheckingInspection")

for the field.



+7


source







All Articles