I have a case of a lot of UI strings in Android strings.xml
resource files, such as sol3
, which are not words, and which do not belong in a dictionary. I would like to disable lint spell check for those strings, on a per-element basis, something like
<string someattr="nospellcheck">sol3</string>
and on a per-file basis, something like
<resources someattr="nospellcheck">...</resources>
Is there any way to do that?
My only solution now, is to gather the non-word stings into separate resource files with a different name, perhaps non-words.xml
. Then in Android Studio's Settings,
create a Scope that filters for that file name, and under
Editor->Inspections->Correctness->Messages
In both of these, there is an option to add a Scope (non-obvious). Add the Scope, before Everywhere Else.
But that is horrible. What is the right way to locally suppress spell checks in XML files?
(I got this working for .bat files under Editor->Inspections->Proofreading, but for the current issue, I only managed to change the Message, not make it stop appearing.)