Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to accommodate multiple coding styles? (git vs. IDE)
    primarykey
    data
    text
    <p>I am collaborating on a git-sourced, maven-managed Java project with differing code styling preferences with users using multiple IDE's (note 1). </p> <p>Is there a tool or IDE configuration that will allow code to be viewed and edited using <i>style-1</i>, but committed to SCM using <i>style-2</i>?</p> <p>My research points me to 'no', but a solution combining <a href="http://git-scm.com/book/ch7-3.html" rel="nofollow noreferrer">git hooks</a> and <a href="http://checkstyle.sourceforge.net/" rel="nofollow noreferrer">Checkstyle</a>/<a href="http://jrefactory.sourceforge.net/csrefactory.html" rel="nofollow noreferrer">jrefactory</a> might be possible.</p> <p>So if 'no' to above, is there a tool/process that will perform the <i>TBD process</i> actions below?</p> <p>The checkout process flow for User1 would be:</p> <ol> <li><code>git pull</code> </li> <li><i>TBD process</i> formats code to User1 <i>style-1</i></li> <li>User1 works in their preferred IDE with <i>style-1</i> settings</li> </ol> <p>The commit workflow for User1 would be:</p> <ol> <li>User1 is ready to commit/push code</li> <li><i>TBD process</i> formats code to standard format <i>style-standard</i></li> <li><code>git push</code></li> </ol> <p><p> Note 1: multiple IDE's = Eclipse, IntelliJ, Netbeans.</p> <p>Note 2: My question differs from <a href="https://stackoverflow.com/questions/4768370/are-there-any-tools-out-there-to-refactor-the-coding-style-of-a-java-code-base">this question</a> in that I'd like to focus on an IDE-related solution, since forcing the minority of standards-divergent users is probably a more efficient solution.</p> <p>Note 3: Acknowledging that this shouldn't be done for best-practices-reasons. However, if you grant that it's time expect more flexibility from our IDEs and SCMs, this question is intended to explore those solutions.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload