Skip to content

Latest commit

 

History

History
39 lines (28 loc) · 4.25 KB

CONTRIBUTING.md

File metadata and controls

39 lines (28 loc) · 4.25 KB

HERE Data SDK for TypeScript Contributor Guide

The team behind HERE Data SDK for TypeScript gratefully accepts contributions via pull requests filed against the GitHub project. As part of filing a pull request, we ask you to sign off the Developer Certificate of Origin (DCO).

To maintain a high software quality standard, we strongly prefer contributions to follow these rules:

  • We follow the best practices of working with GitHub to bring the ultimate experience to SDK users. In general, we share the view on how to write a commit message with the Git project itself:

    • Make separate commits for logically separate changes. For example, simple formatting changes that do not affect software behavior usually do not belong in the same commit as changes to program logic.
    • Describe your changes well. Do not just repeat in prose what is "obvious" from the code, but provide a rationale explaining why you believe your change is necessary.
    • Describe your changes in the imperative. Instead of writing "Fixes an issue with encoding" prefer "Fix an encoding issue". Think about it like the commit only does something if it is applied. This usually results in more concise commit messages.
    • We are picky about whitespaces. Trailing whitespace and duplicate blank lines are simply an extreme annoyance, and most Git tools flag them red in the diff. We generally use four spaces for indentation in TypeScript code, and two spaces for indentation in JSON / YAML files.

    If you have ever wondered how a "perfect" commit message is supposed to look like, look at basically any of Jeff King's commits in the Git project.

  • When addressing review comments in a pull request, please fix the issue in the commit where it appears, not in a new commit on top of the pull request's history. While this requires force-pushing of the new iteration of your pull request's branch, it has several advantages:

    • Reviewers that go through (larger) pull requests commit by commit are always up-to-date with latest fixes, instead of coming across a commit that addresses one of possibly also their remarks only at the end.
    • It maintains a cleaner history without distracting commits like "Address review comments".
    • As a result, tools like git-bisect can operate in a more meaningful way.
    • Fixing up commits allows for making fixes to commit messages, which is not possible by only adding new commits. If you are unfamiliar with fixing up existing commits, please read about rewriting history and git rebase --interactive in particular.
  • To resolve conflicts, rebase pull request branches onto their target branch instead of merging the target branch into the pull request branch. This again results in a clean history without "criss-cross" merges.

  • Please see CODINGSTYLE.md for more information about the coding style.

Thank you for reading and happy contributing!