This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 118377

Summary: [65cat] Reformat code to user-based preferences during checkout and to code standard during checkin
Product: versioncontrol Reporter: wobster <wobster>
Component: CodeAssignee: Ondrej Vrabec <ovrabec>
Status: NEW ---    
Severity: blocker CC: mmirilovic, pjiricka
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description wobster 2007-10-10 15:06:51 UTC
One of the long enduring battles that developers have world wide is agreeing on a common code formatting standard.  With
today's capabilities (i.e. fast computers, automatic reformatting, smart differencing tools), I feel that forcing a code
standard on developers is archaic and inhumane (similar in spirit to the practice of giving frontal lobotomies for
mental illness). There is really no reason any longer to inflict a mandated coding standard on every developer on a
given project.

To end the battle, I'd like to propose that the source control module allow the developer to specify the preferred
format for the code when checked out and the common coding standard used (canonical format such as Sun's standard) for
the code when checked in. It would be similar to what is done with the various flavors of end of line delimiters (cr vs
crlf vs lf) but a bit more extensive.

The differencing tools may need to be enhanced to take into account the formatting changes as well by ignoring purely
formatting changes (brace alignment strategies, spacing etc.)