Skip to content

Latest commit

 

History

History
100 lines (74 loc) · 2.82 KB

CONTRIBUTING.md

File metadata and controls

100 lines (74 loc) · 2.82 KB

Contributing to chap

These guidelines describe how to contribute to chap. These are just guidelines, not rules. Use your best judgement, and feel free to propose changes to this document in a pull request.

Table Of Contents

  1. Prerequisites
  2. Building
  3. Testing
  4. Formatting Commits

CLA

If you wish to contribute code and you have not signed our contributor license agreement (CLA). Our bot will update the issue when you open a pull request. For any questions about the CLA process, please refer to our FAQ.

Prerequisites

  • Linux - Linux is the only supported platform for building and running chap. The primary testing distribution is Ubuntu LTS.

  • C++11 - Currently supported compilers are:

    • GCC 4.8
    • GCC 5 (on Ubuntu 16.04 LTS)
    • GCC 6
  • CMake - We require CMake 3.5.

  • clang-format - We use clang-format's 'Google' style to format code.

  • replxx - We use replxx from source as a git submodule for command history and tab completion.

Building

git clone https://github.com/vmware/chap.git
cd chap
git submodule update --init --recursive
mkdir build-chap
cd build-chap
cmake ../
make
./chap
Usage: chap [-t] <file>

-t means to just do truncation check then stop
   0 exit code means no truncation was found

Supported file types include the following:

64-bit little-endian ELF core file
32-bit little-endian ELF core file

Testing

We use CTest to run tests.

cd build-chap
ctest
Test project /dbc/pa-dbc1110/mzeren/build-chap
    Start 1: expectedOutput/ELF32/LibcMalloc/OneAllocated
1/1 Test #1: expectedOutput/ELF32/LibcMalloc/OneAllocated ...   Passed    0.14 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.14 sec

Pull Request Checklist

Before publishing a pull request, please:

  1. Review open and closed issues to look for duplicates.
  2. Add tests to test your change.
  3. Run the full test suite.
  4. Use clang-format to format just your changed lines. The git-clang-format script may be helpful.

Formatting Commit Messages

When formatting commit messages please:

  1. Separate subject from body with a blank line.
  2. Prefix subject with a one word category such as doc:, build:, tests, core:, etc.
  3. Capitalize the subject line.
  4. Try to limit the subject line to 50 characters.
  5. Do not end the subject line with a period.
  6. Use the imperative mood in the subject line.
  7. Wrap the body at 72 characters.
  8. Use the body to explain what and why vs. how.

For more background and discussion on these rules please read: http://chris.beams.io/posts/git-commit/