Turning off HTML validation. I mean it.

I want to turn every facet of HTML validation, period. Due to the dynamic, generated nature of my JSP pages, such validations are most often than not just an inventive way to paint my right gutter in yellow. All I want from IDEA regarding HTML is highlighting, and thankfully it's good enough at that.

So, how can I accomplish this? I've already unchecked the "Required HTML attributes", "Unknown HTML attributes" and "Unknown HTML tags" inspections, but IDEA still complain about tags being on the wrong place ("XX tag is now allowed here").

BTW, the Errors configuration dialog needs some serious reorganization before release. Options related to JSP/HTML/JavaScript should be grouped together.

1
50 comments

I've missed all this discussion due to being on holiday (ahhhh), but Marcus is absolutely right. I'm now accustomed to ignoring a yellow gutter in my page files. Syntax highlighting and completion only, please.

0

I'm now accustomed to ignoring a yellow gutter in my page
files. Syntax highlighting and completion only,
please.


That's what I've been doing lately, and this is VERY BAD. In the last few years using IntelliJ, I've trained myself to never ignore a warning, specially after they've introduced the ability to disable warnings for a specific code element.

I've become used to never take a warning lightly, to always check what could be triggering the warning, and fix the problem or add a //noinspection comment if it's actually legitimate use of a code construct I've chosen to be warned about.

If I start ignoring them on my pages, the full power of code analysis is completely lost: what good is to analyse your code, if you'll be ignoring the results?

0

You are right I meant hector :).
Evgeny Goldin wrote:

Do you mean clicking the man's head icon in the bottom-right corner and setting the "Highlighting Level" to "None" ?

If yes - it makes the errors disappear but I still can't see where tag <x> closes. See the screesnhot attached - the cursor stands on the beginning of tag <thead> but the matching </thead>

> isn;t highlighted as it's used to be in version 4.5 ..
I can't understand what you want us to do... If to turn off analysis I
showed the way if to work with your code change the subject.

IK

0

Marcus, did Hector solve your problem?

IK

0

Yes, setting the highlight level to "None" removes all the unwanted warnings. But I don't want to do this for every file, I want to turn off the inspection highlight for all HTML files.

0

Marcus Brito wrote:

Yes, setting the highlight level to "None" removes all the unwanted warnings. But I don't

>want to do this for every file, I want to turn off the inspection
highlight for all HTML files.
This feature will be implemented in next release.

IK

0

But I don't want to do this for every file, I want to turn off the inspection highlight for all HTML files.


Do I sense a growing frustration here.. =), Please IDEA guys - the request is simple the request is reasonable the request is relatively easy? to implement.

There ARE files and situations that are impossible to validate for HTML. Global/Project level option for that, or a shortcut key to temporarily disable HTML validation seems like a good IDEA. =)

0

Off-topic - why is it called Hector ? I guess I've missed it
.. :)

I showed the way

What way ? Disabling Hector still doesn't allow me to pair closing and opening tags because of FreeMarker instructions in the middle.

I can't understand what you want us to do

Oh, that's very simple (for us to say) and was already said numerous times in this thread: make it at least work the same way it worked in version 4.5.
Nobody wants to remove the HTML validation functionality from version 5, all we ask is to make it optional so that (for me at least) even having errors in the page I could see where my damn tag closes. Let me show the same example again (see the screesnhot attached) - my cursor is standing at the beginning of tag but matching ]]> tag isn't highlighted the way it used to be in version 4.5. Hector's has "Highlighting Level" set to "None" - besides, even if altering Hector could solve the problem, nobody wants to do it for every page over and over again, as was already said here.
The second screesnhot is clearly (I hope) showing the same code in version 4.5.4 so that you can compare them - I've marked things I'm missing in red.



Attachment(s):
1.bmp
2.bmp
0

This feature will be implemented in next release.


Ah, the dreaded setence. Seriously guys, having no way to disable HTML warnings will be a no-no for many web development shops out there.

Fortunately for us, unfortunately (in this specific scenario) for you, IDEA is free for evaluation. I can see lots of web developers trying IDEA for 30 days and getting extremely frustrated at not being able to turn off the HTML warnings. It's such a small thing, that becomes highly annoying when you work on hundreds of JSP/HTML pages every day.

It's also a matter of principles, like explained above: when the vast majority of your warnings are actually false positives, people will start to ignore them, and the greatest single feature in IDEA -- code analysis -- will be lost forever.

0

Igor, do you mean there will be an option allowing the screenshot I've provided look the same in IDEA 5.5 ?
So that having some template engines instructions (be it JSP/Velocity/FreeMarker) will still allow one to get all usual HTML highlightings ?

IDEA 5: http://intellij.net/servlet/JiveServlet/download/22-153608-4895190-6580/1.bmp

IDEA 4.5.4: http://intellij.net/servlet/JiveServlet/download/22-153608-4895190-6581/2.bmp

Btw, how about telling an HTML highlighter "Ignore the following statements: <#.../>, ${...}, etc"

0

> Igor, do you mean there will be an option allowing the screenshot
I've > provided look the same in IDEA 5.5 ?
> So that having some template engines instructions (be it
> JSP/Velocity/FreeMarker) will still allow one to get all usual HTML
> highlighting ?
>
> IDEA 5:
>http://intellij.net/servlet/JiveServlet/download/22-153608-4895190-6580/1.bmp
>
> IDEA 4.5.4:
>http://intellij.net/servlet/JiveServlet/download/22-153608-4895190-6581/2.bmp

I think it's reasonable to post a request for this bug.

> Btw, how about telling an HTML highlighter "Ignore the following
> statements: <#.../>, ${...}, etc"
Problem is not only with highlighter it's much deeper. Your case looks
so unusual that I'm not sure if we manage to support it.

IK

0

Sure, http://www.jetbrains.net/jira/browse/IDEA-4135

Your case looks so unusual

Why unusual ? It's a simple FreeMarker template. Since IDEA (or it's plugins) don't provide any special support for working with Velocity/FreeMarker templates - we usually set template files to be "HTML files" as it's the only way to get a reasonable highlighting and pairing of opening/closing tags. I'm sure we're not the only doing it so it's not that unusual, after all.

0

I don't see what's unusual about his template, either. I'll try to look for an "unusual" template and post it here. But then again, it may be too horrifying :)

Moreover, Pallada had no problems dealing with templates like this one.

0

Not unusual at all actually. Quite common when you use velocity or
freemarker.

R

0

I don't mean to be negative ... I LOVE this product. (In fact I signed up for Smart Subscription with my own money 8-)

But it's really frustrating when things "regress" from one release to the next. In this case, the HTML validation of 5.0 is seen as much less useful by some people than the way 4.5 worked. Isn't it reasonable to expect that IDEA 5.0 should not be worse than 4.5?

I understand that it can be difficult to preserve every nuance once a product becomes mature and complex. (Anybody used SlickEdit lately?) But this does seem like it should be a simple fix.

John Hurst
Wellington, New Zealand

0

Hi Maxim,

I have a line in a Tapestry template which reads

]]>

This is interpreted by Tapestry to invoke the Script component, and read source from the given relative path. It works fine.

IDEA 3429 is marking the ".." in red, with the message "statement expected".

I suppose it is trying to parse it as JavaScript. In Tapestry components that is not the way this attribute is treated.

I certainly don't expect IDEA to support Tapestry syntax ... but IDEA 4.5 treats these files pretty well, so I agree with others on this thread that it would be great if IDEA 5 could optionally treat HTML files the same as IDEA 4.5.

Thanks for your attention,

John Hurst
Wellington, New Zealand

0

How do I turn off validation for Symbols in JSP tags. I.e.

<bean:message key="label.loggedinuser"/>

produces an error saying that 'Cannot resolve symbol label.loggedinuser'

I can do this on a file by file basis, but I have many files.

0

Ummhh, using 3436 still has no option to do this.
See http://www.jetbrains.net/jira/browse/IDEA-4471

Igor Kuralenok (JetBrains) schrieb:

Marcus Brito wrote:

>> Yes, setting the highlight level to "None" removes all the unwanted
>> warnings. But I don't


>want to do this for every file, I want to turn off the inspection
highlight for all HTML files.
This feature will be implemented in next release.

IK

0


+1

I completely agree with Marcus. If I have hundreds of
files do I have to check every single file to disable
HTML inspections?

Amazing, IDEA team used to be very intuitive with
regard to the user interface, but this time they've
made a mistake. Hope they correct it in the next EAP.

0

I'm still waiting (and hoping) for this too.

John Hurst
Wellington, New Zealand


0

Please sign in to leave a comment.