Prevent generated Code from formatting

I want my code to be formatted by phpstorm. But I have projects with directories with generated code inside them. This generated code has to be committed to git. When I do this, phpstorm will reformat the files just like all the other php files that have been manually edited. However every time I regenerate the code the formatting is different from what phpstorm did and so these files appear as "changed" in phpstorm.

I always have to reformat these files to remove them from the list of changed files.

Anyone an idea how to solve that?

Idea 1: show only files in the list of changes that have more changes than just white-space? How can I achieve that?

Idea 2: exclude these folders from automatic code reformatting. How can I achieve that?

Idea 3: only the directories with generated code should not appear in changes if the changes are only white-space.

 

0

Please sign in to leave a comment.