17

I want to ignore spellcheck warnings for specific files only in Android Studio. I have tried this out but this seems to be equivalent to SuppressLint instead of SuppressWarning. http://developer.android.com/tools/debugging/improving-w-lint.html

Here's an example of something like what I want to do

<?xml version="1.0" encoding="utf-8"?>
<lint>
    <issue id="SpellCheckingInspection" severity="typo">
        <ignore path="app/src/main/res/values/local_values.xml" />
        <ignore path="app/src/main/res/values/strings.xml" />
        <ignore path="app/src/main/AndroidManifest.xml" />
    </issue>
</lint>

Any ideas?

Josh Woodcock
  • 2,683
  • 1
  • 22
  • 29

5 Answers5

1

You can prevent the lint check for comments like below;

enter image description here

click the yellow lamp and go to

"Typo:Change to..." -> "Edit inspection profile setting"

and Inspections window will open like below;

enter image description here

then uncheck the "Process comments" option and press OK button.

After those steps, typo underlines and typo lint warnings will gone.

oguzhan
  • 2,073
  • 1
  • 26
  • 23
1

Currently it is not possible to ignore spell check for specific files

Josh Woodcock
  • 2,683
  • 1
  • 22
  • 29
1

You can

  1. suppress the spell checks for an entire class
  2. or even suppress all the inspections for a particular class

by running the code inspection and selecting the specific warning to be suppressed.

Here are the steps:

From the android studio menu bar, select Analyze -> Inspect Code

Once the inspection is complete, from the list of warnings under Proofreading -> Typo -> select the particular warning from a file that has to be suppressed.

On the right-side panel, select the drop-down to suppress the warning for:

  1. particular class
  2. particular field
  3. suppress all warnings for the particular class.

Refer to the image below FYI:

enter image description here

Gurunath Sripad
  • 1,308
  • 2
  • 14
  • 24
0

For me, adding @file:Suppress("SpellCheckingInspection") at the top of the file helped :)

Simon
  • 2,643
  • 3
  • 40
  • 61
-4

For Android Studio, Uncheck options you want to disable under File >> Settings >> Editor >> Inspections >> Spelling >> Typo

Nooruddin Lakhani
  • 7,507
  • 2
  • 19
  • 39