PhpStorm ignore generated code on reformat

is it possible that PhpStorm don't reformat files, which are generated from another program? Is there a PHPDoc comment (something like /** @generatedFile */) that excludes a file from reformatting?

Upvotes: 2

Views: 364

Answers (1)

GolezTrol
GolezTrol

Reputation: 116100

You can use //@formatter:off and //@formatter:on to define a region that should be ignored by the formatter. If it's possible, add those at the beginning an end of the generated files.

See: http://www.jetbrains.com/phpstorm/webhelp/reformatting-source-code.html

Upvotes: 2

Related Questions