Skip to content

Latest commit

 

History

History
59 lines (44 loc) · 2.12 KB

CONTRIBUTING.md

File metadata and controls

59 lines (44 loc) · 2.12 KB

Contributing

Pull requests only

  1. Push to the master branch directly is restricted.
  2. Use feature branches and let people discuss changes in pull requests.
  3. Pull requests can only be merged after all discussions have been concluded and 2 reviewers have given theirs approval (:+1:)

Workflow

  1. Create an issue and describe your idea (remember its number)
  2. Create your feature branch: git checkout -b <issue-NUMBER>
  3. Commit your changes: git commit -am 'Add some feature'
  4. Publish the branch: git push origin issue-NUMBER
  5. Create a new Pull Request

Rules

  1. Every change needs a test (fortunately codecov.io keeps code coverage metric)
  2. Keep the code style by resolving SwiftLint warnings
  3. Commit message must be in the following format:
#<issue_number>: <body>

External libraries

Main frameworks (ZalandoCommerceAPI and ZalandoCommerceUI) have strict rule to do not depend on any external library.

In some exceptional cases it could be lifted, but you should always first consider copying source code from the external framework instead (and the best – not whole, but just needed part).

Rationale behind is:

  1. Don't force end-developers to use additional libraries. It makes their app fatter and harder to maintain, as it could also lead to conflicts with their own dependencies
  2. A small piece of code which does the job well is easier in maintenance than coupling to external library, which could change a lot
  3. Not updated library may introduce risk of having it not fixed or updated if it loose a maintainer
  4. Updating unmaintained the whole external library (eg. for new Swift version) on your own could be time consuming
  5. And in general, not only on framework level: the less dependencies, the higher reuse factor.

They're totally allowed in satellite projects (MockAPI or ZalandoCommerceDemoApp), however the less we have them, the simpler maintanance and updating is.

For this purpose we use Carthage. calypso.rb has an appropriate task for it:

brew install carthage
./calypso.rb deps build