Home

Awesome

Pronto runner for clang-format

Code Climate Build Status Gem Version

Pronto runner for clang-format, a tool to reformat C/C++/Java/JavaScript/Objective-C/Protobuf code according to configurable style guidelines. What is Pronto?

As an example, this can be used to run clang-format and submit replacements to web-based git repo managers (e.g. github, gitlab, ...) as comments using Pronto.

Installation:

First, the following prerequisites need to be installed:

  1. clang-format
  2. Ruby
  3. Pronto, this can be done after installing Ruby using:
    gem install pronto
    

After that, pronto-clang_format can be installed using:

gem install pronto-clang_format

Pronto will detect and run clang-format as soon as this runner is installed.

Configuration:

The runner can be configured by setting some environment variables before invoking it. The following table lists these environment variables along with a description for each one of them:

Environment variableDescription
PRONTO_CLANG_FORMAT_PATHPath to the clang-format executable that should be run by the runner. This defaults to clang-format
PRONTO_CLANG_FORMAT_STYLEA string that is passed to clang-format's --style= option. This defaults to file
PRONTO_CLANG_FORMAT_FILE_EXTSA comma separated list of file extensions to examine. This defaults to c, h, cpp, cc, cxx, c++, hh, hxx, hpp, h++, icc, inl, tcc, tpp, ipp

Known limitations: