Skip to content
Matt Simerson edited this page Feb 21, 2015 · 27 revisions

We love and appreciate contributions to Haraka.

To contribute, please use the Github "Pull Request" mechanism

  1. fork the project (git clone https://github.com/baudehlo/Haraka.git)
  2. create a branch for your changes (git checkout -b new_branch)
  3. make changes and commit (git commit)
  4. push changes to github (git push)
  5. click on "Create Pull Request" for that branch in Github.

General Guidelines

  • New features must be documented
  • New features should include tests

Style conventions

  • 4 spaces for indentation (no tabs)
  • Semi-colons on the end of statements are preferred
  • Use underscores_to_separate_names (yes this goes against JS conventions - it's the way it has always been done)
  • Do not cuddle elses
  • Use whitespace between operators - we prefer if (foo > bar) over if(foo>bar)
  • Don't comment out lines of code, remove them as they will be in the revision history.
  • Use boolean true/false instead of numeric 0/1
  • See Editor Settings

Tests

  • run all tests: ./run_tests (or "npm test")
  • run tests for a single plugin: ./run_tests tests/plugins/bounce.js
Clone this wiki locally