How do I hide "duplicate" highlighting

194 views
Skip to first unread message

Dave Seligson

unread,
Jul 29, 2021, 6:15:10 PM7/29/21
to Illuminated Cloud Q&A
My code contains two separate javascript files that are mostly duplicates.
I saw the "Duplicates detected" line and using the context sensitive menu I elected to "Show Duplicate lines"

Now I don't see how to remove the bright green highlighting from my edit window.
Please help, my eyes are starting to bleed.

Scott

unread,
Jul 29, 2021, 6:25:24 PM7/29/21
to Illuminated Cloud Q&A, dave.s...@gmail.com
That's the JetBrains IDE's Duplicated Code Fragment inspection which you can configure, disable, etc., under Settings/Preferences>Editor>Inspections>General>Duplicated code fragment.:

Duplicated_Code_Fragment_Inspection.png

You can just disable it entirely for JavaScript if you'd like.

If you want to keep the inspection enabled but only suppress particular instances, you can use Alt+Enter (Windows) / Opt+Enter (Mac) to show the contextual actions for the reported inspection infraction, then press CursorRight to show suppression options:

Duplicate_Code_Inspection.png

Regards,
Scott Wells

Dave Seligson

unread,
Jul 29, 2021, 6:56:25 PM7/29/21
to Illuminated Cloud Q&A, Scott, Dave Seligson
Nope, none of that works.
I cannot get to the context sensitive menu that you are showing.

Scott

unread,
Jul 29, 2021, 7:18:12 PM7/29/21
to Illuminated Cloud Q&A, dave.s...@gmail.com, Scott
So disabling the Duplicated Code Fragment inspection doesn't eliminate this highlighting? If not, what message is displayed when you hover over the highlighted code? It must be some other inspection adding the annotation/highlighting. You should be able to disable any code inspection that you don't want, though. It's really a matter of determining which inspection it is. However, Alt+Enter/Opt+Enter should show invoke Show Context Actions to show that menu.

Regards,
Scott
Reply all
Reply to author
Forward
0 new messages