Only "Reformat code" selected file types on commit?

We are working on a big project with many Java, HTML, CSS, LESS, Javascript and Coffeescript files.

The backend developers LOVE to automatically reformat their Java code on commit. The same goes for the designers and their HTML, CSS and LESS files.
BUT the frontend developers prefer Sublime (... without auto fomatting). This is a problem since the designers sometimes help them with the HTML ... 2 editors ... weird changelogs ... chaos.

We need to reformat all Java files on commit, but not ...

  • A) ... files in specific folders
  • or B) ... files with specific file types

How can this be done?

Please sign in to leave a comment.