Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore spelling warning in Android studio for specific files

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?

like image 648
Josh Woodcock Avatar asked Sep 20 '15 06:09

Josh Woodcock


3 Answers

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.

like image 115
oguzhan Avatar answered Nov 20 '22 16:11

oguzhan


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

like image 1
Josh Woodcock Avatar answered Nov 20 '22 17:11

Josh Woodcock


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

like image 1
Gurunath Sripad Avatar answered Nov 20 '22 17:11

Gurunath Sripad