Skip to content

[FR] Run clang-format on C files #5982

@SteveBronder

Description

@SteveBronder

I'm reading through rbindlist.c and there are several lines like

    for (int j=0; j<thisncol; ++j) { int tt=length(VECTOR_ELT(li,j)); if (tt>maxLen) { maxLen=tt; whichMax=j; } }

It would be nice to run clang-format over all of the c files in src just to make these lines more easily parsable.

Eigen and the Stan math have done this and there's a lot of discussion around the pros and cons. The main con being that you have one hard break in your git, but that can be resolved by adding a .git-blame-ignore-revs file that ignores the reformatting. A .clang-format file can be included to modify any of the defaults as the team wishes

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-qualityIssues related to improving code quality/readabilityinternals

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions