Changes between Version 15 and Version 16 of CodingGuidelines/SubmittingPatches
- Timestamp:
- Sep 4, 2018, 3:47:36 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
CodingGuidelines/SubmittingPatches
v15 v16 5 5 6 6 === Coding style === 7 The [http ://www.haiku-os.org/development/coding-guidelines Coding Guidelines] are expected to be followed when submitting patches.7 The [https://www.haiku-os.org/development/coding-guidelines Coding Guidelines] are expected to be followed when submitting patches. 8 8 9 9 '''Note:''' When patching existing files that do not follow our Coding Guidelines, it is preferable to apply the stylization to the entire file. If that is not possible, then conform to the pervading style being used. 10 * [http ://dev.haiku-os.org/browser/haiku/trunk/src/tools/checkstyle checkstyle] can be used to help identify violations10 * [https://git.haiku-os.org/haiku/tree/src/tools/checkstyle checkstyle] can be used to help identify violations 11 11 * [wiki:CodingGuidelines/VIM] integrate with vim to check style. 12 * [https://github.com/owenca/haiku-format.git haiku-format] can be used to check/correct the coding style of a file. 12 13 13 14 Be aware, that these style checker tools may generate false positives (eg, evaluating comments as coding violations) or may miss other violations. … … 23 24 === Committing changes === 24 25 25 * Before making any commits to the Haiku repository (local even), be sure to [http://www.haiku-os.org/guides/building/get-source-git#configure_env configure the git environment] on your local system! Failure to configure git properly before a commit will result in incorrect naming in your commit and public humiliation on the mailing list. 26 * Create patches from within the ''HAIKU_TOP'' directory. This is the directory that contains ''configure'' and typically is the ''haiku/'' or ''buildtools/'' branch. 27 * {{{git status}}} will display which files are modified, added, or deleted. Use `git diff` to inspect your changes. 26 * Before making any commits to the Haiku repository (local even), be sure to [https://www.haiku-os.org/guides/building/get-source-git#configure_env configure the git environment] on your local system! Failure to configure git properly before a commit will result in incorrect naming in your commit. 27 * {{{git status}}} will display which files are modified, added, or deleted. Use `git diff`to inspect your changes. 28 28 * You'll then have to commit your changes locally by adding the changed or added files (`git add my-file my/new/file`), and then do a `git commit`. 29 29 * You will need to enter a complete commit message that will later appear as is in Haiku's repository if your patch is going to be accepted. … … 35 35 Create an account on [https://review.haiku-os.org Haiku's Gerrit instance] using your GitHub account, and add your SSH keys. 36 36 37 '''Note''': If, after creating an account, you do not have any email addresses attached, please create a ticket under the component {{{Website/Gerrit}}} and specify your GitHub username and the email address you would like the administrators to set for you. 38 39 '''Note''': Any commits submitted to Gerrit ''must'' have the same email address as is in your Gerrit account, or else Gerrit will reject your submission! 37 '''Note''': Any commits submitted to Gerrit ''must'' have the same email address and user name as is in your Gerrit account, or else Gerrit will reject your submission! 40 38 41 39 Then submit your commits to Gerrit like this: … … 65 63 ''Lastly and most importantly'': once a developer reviews your submitted code, expect them to point out any and all flaws. This is standard procedure and is constructive criticism. Remember, we want to help you improve your coding abilities. 66 64 67 You may want to either subscribe to or read the [http ://www.freelists.org/list/haiku-commits haiku-commits] mailing list archives. It is quite common for the discussion of recently committed code to occur on this list.65 You may want to either subscribe to or read the [https://www.freelists.org/list/haiku-commits haiku-commits] mailing list archives. It happens that discussions of recently committed code occur on this list, even if normally the discussion is mainly on our Gerrit instance...