Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "CDT/policy"

< CDT
(Committing Code)
(Replaced content with "{{warning|Note: The contents of this page has been migrated to GitHub. Please see the [https://github.com/eclipse-cdt/cdt/blob/main/POLICY.md Policy Guide] for current inf...")
 
(67 intermediate revisions by 14 users not shown)
Line 1: Line 1:
== Code Formatting ==
+
{{warning|Note: The contents of this page has been migrated to GitHub. Please see the [https://github.com/eclipse-cdt/cdt/blob/main/POLICY.md Policy Guide] for current information or page history for historical information}}
  
* It is recommended to use default "Eclipse" code formatting for Java for new code.
+
[[Category:CDT]]
* It is recommended to preserve formatting of old code when making patches
+
 
+
== Eclipse Java Errors/Warnings ==
+
 
+
It is strongly recommended for cdt plugins to override default compiler error/warning and use project specific errors/warnings.
+
These errors should be enabled:
+
 
+
* Method with a constructor name - Error
+
* Assignment has no effect - Error
+
* Possible accidental boolean assignment - Error
+
* finally does not complete normally - Error
+
* Using a char array in string concatenation - Error
+
* Null pointer access - Error
+
* Potential null pointer access - Warning
+
* Unused Import - Error
+
 
+
All commiters and contributors submitting patches should enable [http://wiki.eclipse.org/PDE/API_Tools/User_Guide#API_Tooling_Setup API tooling] by setting target baseline platform. Do not commit code with API errors.
+
 
+
'''Patches with errors listed above including API errors will not be accepted without corrections.'''
+
 
+
== Copyright ==
+
 
+
Use eclipse copyright header: http://www.eclipse.org/legal/copyrightandlicensenotice.php. Here is an example:
+
 
+
<pre>
+
/*******************************************************************************
+
* Copyright (c) 2008, 2010 XYZ Corp. and others.
+
* All rights reserved. This program and the accompanying materials
+
* are made available under the terms of the Eclipse Public License v1.0
+
* which accompanies this distribution, and is available at
+
* http://www.eclipse.org/legal/epl-v10.html
+
*
+
* Contributors:
+
*    Jane Doe (XYZ Corp.) - initial API and implementation
+
*    John Smith (ABC Enterprises) - Multi-gadget support for the widget (bug 654321)
+
*******************************************************************************/
+
</pre>
+
 
+
Normally contributors line is added for significant changes in the file.
+
 
+
== Javadoc ==
+
 
+
All new public classes must have meaningful javadoc header, as well as all public and interface methods and constants.
+
 
+
== Contributing the Patch ==
+
 
+
* To fix anything in CDT first you need to create or find existing bugzilla report for this particular problem/enhancement
+
* Check out the code from corresponding branch and apply the fix
+
* Comment your changes in the code
+
* If the changes are significant add your name and company in the contributor list in the file header
+
* Follow CDT guidelines for code formating and java warnings/errors
+
* To minimize the patch, do not re-format the source code you edited (except changed lines). Do not fix any warnings in the code you are not changing
+
* Create a patch "Team->Create Patch" command on changed projects, select Workspace as a scope even when only one file has changed.
+
* Submit patch using an attachment to a bug report
+
* Mark attachment as a patch
+
* If previous patches attached to the bug, which are obsolete now mark them as such
+
* Add a comment to which branch the patch should  be applied (HEAD by default)
+
* Add a comment on what patch is doing, it is not easy to figure it out from the code sometimes
+
* Make sure bug report has a clear reproducible scenario, if not add one
+
* If you really want to do formatting or styling (such as converting to java 1.5) - create another bug for that and attach a patch
+
* To speed up process of applying your patch you should create one or more junit tests as well and attach as separate patch
+
* Normally committers are watching new bugzilla activity and somebody would look at your patch in a few days
+
* If the patch has not received an attention in a week or so some nagging can help. Send email to mailto:cdt-dev@eclipse.org asking committers to look at the patch
+
 
+
see also [[CDT/contributing]]
+
 
+
== Applying the Patch ==
+
 
+
* Assign bug to yourself
+
* Set target milestone field to release in which patch would be applied, If it is applied in two branches set target milestone to maintenance branch
+
* Code inspect the patch, apply and test
+
* Commit the patch
+
* Set the iplog as follows:
+
** to '-' if the patch came from a committer
+
** to '+' if the patch came from a non-committer.
+
* If the patch is >= 250 lines, it must be submitted for IP review, i.e. CQ in IPZilla. See [[Development_Resources/Automatic_IP_Log]]
+
* Check that all non-committed patches are marked as obsolete
+
* Change bug state to fixed. Check again that you set milestone field.
+
* Add a comment about where it was fixed (branches) and related notes
+
 
+
== Committing Code ==
+
 
+
* API changes have to be discussed in cdt-dev mailing list before commiting
+
* When development reaches cycle where release candidates are built, letter in cdt-dev should be sent for every commit you are making
+
* Have a bug associated with every commit, bug number at the begging of commit comment in form of <tt>Bug 12345 bug comment</tt>
+
* Have a patch for commit attached to the pr (optional but encouraged)
+
* Optional request a reviewer bug setting review flag to ? and flag comment to person address (or inbox)
+
 
+
== Version Numbering ==
+
 
+
See [[Version_Numbering|Eclipse Version Numbering Guildlines]]
+
 
+
== Bugs Workflow ==
+
For creating and managing bugs see
+
http://wiki.eclipse.org/CDT/Bugs
+

Latest revision as of 11:06, 9 November 2022

Warning2.png
Note: The contents of this page has been migrated to GitHub. Please see the Policy Guide for current information or page history for historical information

Back to the top