citusdata / pg_shard

ATTENTION: pg_shard is superseded by Citus, its more powerful replacement
https://github.com/citusdata/citus
GNU Lesser General Public License v3.0
1.06k stars 63 forks source link

Add uncrustify config and use it #89

Closed jasonmp85 closed 9 years ago

jasonmp85 commented 9 years ago

Works well with at least Uncrustify 0.61, though it may work just as well with other versions. In zsh one can check style with:

uncrustify -c .uncrustify.cfg --check  **/*.[ch]~ruleutils*

This'll exit with 0 if all files are compliant and will exit with 1 otherwise. Pass --no-backup instead of --check to have uncrustify modify all files in place to be compliant.

Deduced style from most of our codebase and style guides and consulted with team members for any ambiguities I needed resolved.

jasonmp85 commented 9 years ago

To just see the non-whitespace changes to the code made by this branch, check out this link. I may add uncrustify --check to our Travis build in the near future to reject changes that are not compliant with the style rules. They're pretty lenient, and will give you leeway to add breaks, etc. where you see fit, but will make sure you don't have trailing space, mix tabs, misalign variables, etc. We can edit them as we go forward.