Skip to content

Consider adding a .clang-format configuration file #5

Description

@Phundrak

When exploring the C code of pywm, I noticed my text editor would reformat the code to its defaults instead of trying to respect the existing code. A .clang-format file at the root of the project should fix that. This should also ensure a consistent visual coding style across the C files.

It is possible to easily generate one using for instance this website.

I propose the following .clang-format file:

---
BasedOnStyle: LLVM
AlignConsecutiveMacros: 'true'
AllowAllArgumentsOnNextLine: 'true'
ColumnLimit: '80'
DerivePointerAlignment: 'true'
IncludeBlocks: Regroup
IndentWidth: '4'
PointerAlignment: Right
ReflowComments: 'true'
SortIncludes: 'true'
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: 'false'
SpacesInParentheses: 'false'
SpacesInSquareBrackets: 'false'
TabWidth: '4'

...

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions