How do I suppress warnings in Eclipse for PHP?

2019-04-29 02:49发布

In Eclipse, I'm getting warnings for not having a start tag (<div>) because the start tag is in another file. How do I suppress this warning to keep it out of my "Problems" window?

I know in Java I could do @SuppressWarning, but I don't know how for php. I assume that there is, based on the availability of php type hinting in Eclipse, but maybe it isn't?

3条回答
Evening l夕情丶
2楼-- · 2019-04-29 02:54

Go to Window > Preferences. Under Web > HTML Files > Validation you'll find "Missing start tag:" and "Missing end tag:" enter image description here

查看更多
Melony?
3楼-- · 2019-04-29 03:00

You may also set this on a per project base. Go to

Project -> Properties -> Validation

and modify your settings as you like. You can suppress a lot of warnings, especially HTML -> Document Type -> Invalid Location!

查看更多
Luminary・发光体
4楼-- · 2019-04-29 03:06

window->preferences->validation->suspend all validators

will also make eclipse way faster :)

查看更多
登录 后发表回答