How to disable inspections on JSP pages?

The inspections stuff in IntelliJ is pretty cool overall except I'm running into a case where its causing more problems than benefit.

In some cases, we are using JSP files to generate Javascript files out to the browser (e.g. json, javascript caching, etc.). Anyways, we are using custom jsp tags in these jsp files nad IntelliJ is reporting way too many errors, making the file difficult to read.

It's trying to be "intelligent" by notifcing that the page type declartion is javascript and is therefore applying javascript inspections to the file instead of simple jsp/html rules.

Any chance I can disable inspections/error validation for all my *.jsp files, but keep it on for the js files?

2 comments
Comment actions Permalink

If you left-click on hector (the little inspector in the status bar) then you can configure different inspection levels for java, jsp and html.
Unfortunately I think you have to do this once for every file (and I don't know wether Idea stores these settings in shareable project file or in local workspace).

Also why a different setting for javascript is missing, is beyond me. You might want to file a jira issue for that (if one does not already exist).

I think it is possible to create a scope in the project settings that includes your *.jsp files and configure a different error profile for them.
However I cannot figure out how to do that (using latest EAP build 7241).
This issue talks about not being able to use local scopes for error profiles, so I take it that shared scopes should be usable for that:
http://www.jetbrains.net/jira/browse/IDEADEV-8606

0
Comment actions Permalink

Btw, IDEA should adequately handle JSP generating JS (do not report
errors) so please post examples when it complains.

dipiamaze wrote:

The inspections stuff in IntelliJ is pretty cool overall except I'm running into a case where its causing more problems than benefit.

In some cases, we are using JSP files to generate Javascript files out to the browser (e.g. json, javascript caching, etc.). Anyways, we are using custom jsp tags in these jsp files nad IntelliJ is reporting way too many errors, making the file difficult to read.

It's trying to be "intelligent" by notifcing that the page type declartion is javascript and is therefore applying javascript inspections to the file instead of simple jsp/html rules.

Any chance I can disable inspections/error validation for all my *.jsp files, but keep it on for the js files?


--
Best regards,
Maxim Mossienko
IntelliJ Labs / JetBrains Inc.
http://www.intellij.com
"Develop with pleasure!"

0

Please sign in to leave a comment.