The Android Studio lint spell checker flags hex codes that look to it like words in certain files that would be better off unchecked, such as values/colors.xml
and build/intermediates/dex-cache/cache.xml
.
How do I tell lint to not spell check certain folders or files?
This can be done by using IDE scopes. In Android Studio (at least 3.4) you can configure each inspection per scope. The idea is that you create a scope that contains all files you don't want to be spellchecked, and then switch Spelling inspection off for this scope, but keep it on for everything else.
Add a new scope in Settings / Appearance & Behavior / Scopes
that contains all files which you want to exclude from spell checking. For example, this pattern covers all svg
files: file:*.svg
. In your case it could be like file:*/colors.xml||file:*/cache.xml
. IDE will highlight all affected files by green, so you can check if you entered correct pattern.
Then set up Spelling inspection, so that it is OFF for your new scope and ON everywhere else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With