X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=devel%2Funcrustify.cfg;h=d203d4e1020e3cf2e0950e99806373c0f9040978;hp=1dbc5e4e8973e415d28d59e6d9ef46ee8b9fd631;hb=HEAD;hpb=871fc32837d1e734895bef5f89040b5b874ae473 diff --git a/devel/uncrustify.cfg b/devel/uncrustify.cfg index 1dbc5e4e..d203d4e1 100644 --- a/devel/uncrustify.cfg +++ b/devel/uncrustify.cfg @@ -1,13 +1,13 @@ # -# uncrustify config file for the linux kernel +# Uncrustify config file for notmuch. +# Based on uncrustify config file for the linux kernel # # $Id: linux-indent.cfg 488 2006-09-09 12:44:38Z bengardner $ # Taken from the uncrustify distribution under license (GPL2+) # -# sample usage: +# Sample usage: # uncrustify --replace -c uncrustify.cfg foo.c # -# indent_with_tabs = 2 # 1=indent to level only, 2=indent with tabs align_with_tabs = TRUE # use tabs to align @@ -16,8 +16,9 @@ input_tab_size = 8 # original tab size output_tab_size = 8 # new tab size indent_columns = 4 -indent_label = 2 # pos: absolute col, neg: relative column +indent_label = -2 # pos: absolute col, neg: relative column +indent_cmt_with_tabs = false # true would align to tabstop always... # # inter-symbol newlines @@ -56,6 +57,16 @@ nl_after_struct = 0 # mod_full_brace_while = remove # "while (a) a--;" vs "while (a) { a--; }" +# In case some custom types aren't detected properly by uncrustify +# add those to this section below. For example there are cases where +# uncrustify doesn't know whether a 'token' is part of pointer type +# or left operand of a binary multiplication operation. + +type FILE +type GMimeObject GMimeCryptoContext GMimeCipherContext +type mime_node_t notmuch_message_t notmuch_show_params_t +type sprinter_t + # # inter-character spacing options # @@ -63,6 +74,9 @@ nl_after_struct = 0 sp_before_ptr_star = force sp_between_ptr_star = remove sp_after_ptr_star = remove +sp_not = force +sp_pp_concat = ignore # XXX 'remove' drops leading space also +sp_pp_stringify = remove # sp _return_paren = force # "return (1);" vs "return(1);" sp_sizeof_paren = force # "sizeof (int)" vs "sizeof(int)" @@ -100,6 +114,14 @@ align_right_cmt_span = 8 # align comments span this much in func # align_pp_define_span = 8; # align_pp_define_gap = 4; -# cmt_star_cont = FALSE +cmt_star_cont = true # indent_brace = 0 + +indent_class = true + +# line width / line splitting +code_width 102 +ls_for_split_full True +ls_func_split_full True +ls_code_width True