''//noinspection' keyword list for IDEA
I can use //noinspection statement to disable suppress some types of code inspection in IDEA IDE (WebStorm, PhpStorm, ...):
// noinspection JSCheckFunctionSignatures
Where can I find a list of all inspections available for this statement?
UPDATE: I'm looking for keywords list for JavaScript.
Solution 1:[1]
The website of the IDEA IDE has a page listing these:
Disable and suppress inspections
https://www.jetbrains.com/help/pycharm/2019.1/disabling-and-enabling-inspections.html
Solution 2:[2]
Unfortunately, at this time (May 2022) JetBrains does not appear to keep an up-to-date list of inspection IDs (what I'll call shortNames) as part of their public online documentation for all products (e.g. there is a page called List of Java inspections, but it doesn't appear to include the shortNames).
If you are a JetBrains customer and this is something you would like then I would encourage you to send feedback to them with suggestions for how the software could be improved. (e.g. on a community forum or YouTrack).
Thankfully, there are some ways to ascertain these shortNames:
1. Use the context menu
Right-click near the "red squiggle", select "Show Context Actions", click directly on the arrow, and click "Suppress for statement". This should generate a comment above the line, e.g. // noinspection NpmUsedModulesInstalled, which then suppresses the inspection for the following line (making the "red squiggle" go away)

Personally, I think having to directly click that arrow symbol is bad UX because it violates the usual convention of the arrow merely signaling that selecting the item, not only the arrow, will open a submenu. Using "..." or "More..." or something would have been more clear. Additionally, it feels inconsistent to have to show an additional menu to reveal the "Suppress ..." options for JetBrains' inspections meanwhile using code quality tools/plugins like eslint causes "Suppress ..." options to be listed on the first level (which, in my opinion, is the most appropriate place for them).
2. Peek at a cheat sheet
Various people have uploaded (unofficial) lists of the inspection names for convenient reference. Here are some:
- https://gist.github.com/discordier/ed4b9cba14652e7212f5
- https://gist.github.com/pieterb/e74f92b8ac40e18ead1d4fd49b97660f
- https://gist.github.com/delameter/8875d19aa4c09afd2eba3801a970abf4
3. Dig into the IDE's installation files
In my case, I searched through files in my WebStorm installation folder (e.g. C:\Users\me\AppData\Local\JetBrains\Toolbox\apps\WebStorm\ch-0\221.5080.193) and found plugins/JavaScriptLanguage/lib/JavaScriptLanguage.jar (which is a compressed archive, using ZIP format, whose contents can can be extracted) and found that the META-INF\plugin.xml file it contained had the information I wanted in the shortName attribute of elements that looked like this:
<localInspection
language="JavaScript"
groupPath="JavaScript and TypeScript"
shortName="JSRemoveUnnecessaryParentheses"
key="unnecessary.parentheses.display.name"
groupKey="js.code.style.issues.group.name"
enabledByDefault="true"
level="INFORMATION"
cleanupTool="true"
implementationClass="com.intellij.lang.javascript.inspections.JSRemoveUnnecessaryParenthesesInspection"
/>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Andrew |
| Solution 2 | jacobq |
