Skip to content

Reformatting the C API #186

Closed
Closed
@ZeroIntensity

Description

@ZeroIntensity

Description:

Some of the C API is kind of ugly - we don't really have a set style guide. The current uncrustify.cfg file that I use looks like this:

code_width = 80
input_tab_size = 8
output_tab_size = 4
indent_columns = 4
sp_before_ptr_star = remove
sp_before_unamed_ptr_star = remove
sp_between_ptr_star = remove
sp_after_ptr_star = add
sp_arith = add
sp_assign = add
sp_bool = add
sp_compare = add
sp_inside_paren = remove
sp_before_byref = remove
indent_simple_newlines = false
indent_with_tabs = 0
nl_for_leave_one_liner = true
ls_code_width = true
align_with_tabs = true
nl_after_semicolon = true
nl_func_call_empty = remove
indent_func_call_param = true
donot_indent_func_def_close_paren = true
indent_align_paren = false
indent_paren_close = 2
indent_ternary_operator = 2
pp_ignore_define_body = true

It can yield some pretty ugly results, though. It might be a good idea to just switch to PEP 7, but I couldn't find an uncrustify config online for that. Either I'll have to make one myself, or if anyone has any better suggestions (or their own uncrusitfy configuration), we could perhaps switch to that.

Metadata

Metadata

Assignees

Labels

c apiThis has to do with the C API (_view)good first issueAn issue that isn't necessarily easy to implement, but not required to be an expert in view.pyimprovementImprovement to an existing feature

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions