Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IDEA: How to suppress warnings for spelling typos?

One of my functions encrypts a string and one of my tests verifies that it took place. Naturally, strings like sldjf982389 are not recognized as a valid English word, so IntelliJ complains.

If there a way to suppress these warnings without adding junk to the dictionary?

enter image description here

like image 342
James Raitsev Avatar asked Dec 27 '12 03:12

James Raitsev


People also ask

How do I get rid of Typo warning in Intellij?

Press Ctrl+Alt+S to open the IDE settings and select Editor | Natural Languages | Spelling. Select either the built-in project-level or application-level dictionary or disable the option to prompt you every time you save a word.


2 Answers

You can use following @SuppressWarnings

For example idea is complaining about "contentid" that should be "contentId" according to him

@SuppressWarnings("SpellCheckingInspection") public static final String ARG_CONTENT_ID = "contentid"; 
like image 110
Nicolas Bossard Avatar answered Oct 04 '22 04:10

Nicolas Bossard


You can disable that in the Inspections menu. Click on the little green box at the top of source code, or navigate to File > Settings > Inspections, under the Project Settings divider. You can then untick the box shown below.

Screenshot of inspections in IntelliJ on Linux Mint

like image 36
Makoto Avatar answered Oct 04 '22 02:10

Makoto