How to suppress all inspection (including errors) in one file/class in Actionscript
Answered
Sometimes you use in your code third party libraries which don't have stellar code (for example Mochimedia's API) and because of that, if you run full code inspection they are there clogging your results. I know how to suppress single statement, but there seems to be no option to suppress them for class or whole file in *.as files. Not to mention I have no idea how to suppress error detection. Is it even possible?
Please sign in to leave a comment.
Hello Maurycy. You can configure inspection profile http://www.jetbrains.com/idea/webhelp/code-inspection.html#h2inspection_profiletitle to use custom defined scope http://www.jetbrains.com/idea/webhelp/code-inspection.html#h2inspection_scopetitle excluding code you don't want to be inspected.
Thank you, I didn't know about the scopes!
I know about scopes, but these do no solves my need to suppress inspection for specific files not only locally but *team-wide*.
- provided XML, JSON, Text, ... files
- Third party Javascript files
Furthermore, a few set of inspection do not work if you use them with a scope restriction (i.e. most of the "Unused" inspections).
Does IDEA 2016.2 already provide more means to do this now?
The links in your answer both point to the same thing. It refers to scopes but there does not seem to explain any way to select a file or folder and say "Do not inspect this code" but without any explanation as to how to do this, I can use the 'generated code' scope on the project and set it to scan only non-generated code.
The application is a Typescript Nodejs application. Javascript code is generated into a folder (or two) and the scans are not needed for the generated code. So I mark the folders where the Javascript gets put as 'generated root' using the right mouse and set the general option for inspections to only inspect the non-generated and it works.
I suggest you work on that page you linked to in the docs. Its not very clear that that is something that can be done.
Lee Meador
The links were provided eight years ago, and are now outdated.
Please refer to:
Here's a more direct answer, for those wanting to suppress inspections for a particular file (or group of files).
Note - If you add additional scopes, and a file is present in more than one scope, the file will have the severity of the first scope that it is found in (starting from the top, going down). You can click the gear icon to modify the scope order.
That last solution doesn't help with every error, there's a solution that does and is easier:
Right click the file, Analyze -> Configure Current File Analysis... Then you can select None or Syntax, depending on which you want