Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

uncrustify

Bruno Dilly edited this page Jul 4, 2016 · 8 revisions

Keeping a consistent coding style through the whole project is important to keep developers mental sanity =) . It makes it possible to have editors configured to keep the code format on any file (per language) and makes it easier to read the project code.

In order to keep Soletta™ project's coding style every pull request is checked by our CI. It's done using check-style script.

We suggest to run it locally before submitting contributions, but output slightly varies depending on uncrustify version.

Soletta project's check-style script requires uncrustify-0.60 or later (we've done some checks with version 0.62 and it seems compatible).

Source code

https://github.com/bengardner/uncrustify/archive/uncrustify-0.60.tar.gz

Arch Linux

Version 0.60 is available in AUR: https://aur4.archlinux.org/packages/uncrustify0.60/

Fedora

To install uncrustify on Fedora distribution just run:

dnf install uncrustify

Ubuntu

The Soletta™ Project's PPA for dependencies has a package for uncrustify 0.60. This PPA can be added to your system's software source by using add-apt-repository:

add-apt-repository ppa:solettaproject/deps

Or, if you prefer to add this PPA manually, add the following lines to /etc/apt/source.list.d/solettaproject-deps.list, replacing VERSION with your Ubuntu version (trusty, vivid or willy):

deb http://ppa.launchpad.net/solettaproject/deps/ubuntu VERSION main 
deb-src http://ppa.launchpad.net/solettaproject/deps/ubuntu VERSION main

Then, proceed with the install:

apt-get update
apt-get install uncrustify=0.60-1ppa2
Clone this wiki locally