phpphpstormphp-parse-error

Can I disable some errors that match a specific criteria on a PHP script in PhpStorm 8.0.2?


I would like to ask e.g. if I have a code like this:

/**
 * Doc comment
 */
@Annotation
class MyClass {

}

I know it will generate a parse error cause PHP doesn't have annotations natively like Java (i.e. outside of comments), but anyway is there a way to make PhpStorm not to complain about it?

enter image description here

Can I disable anyhow that Expected: semicolon in PhpStorm? I mean something like disabling error checking for a pattern matching @[a-zA-Z]+ or something like that?

EDIT: @notulysses The Inspection window shows only Typo and Warning, how can I see the Errors too?

enter image description here


Solution

  • You cannot -- those errors come from Lexer/Parser which is a lower level than inspections (which you may suppress/disable completely on individual basis) and therefore is not suppressible (unless, you write your own PHP-alike language support plugin).