Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

[Proposal] Use clang-format to control or enforce the coding style rules #410

@H0neyBadger

Description

@H0neyBadger

What platform does your feature request apply to?
all (except android maybe)

Is your feature request related to a problem? Please describe.
coding style consistency

Describe the solution you'd like
use automated tools to fix or control PR

Describe alternatives you've considered
N/A

Additional context
Hello,
Please find bellow a possible .clang-format daft for chiaki

# https://clang.llvm.org/docs/ClangFormat.html
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
UseTab: Always
IndentWidth: 4
TabWidth: 4
# to be determined
AlignAfterOpenBracket: Align
# offset of private:, public: ... in class
# AccessModifierOffset: 0 is not very well
# integrated with tab indent (to be determined)
AccessModifierOffset: 0
BreakBeforeBraces: Allman
AllowShortIfStatementsOnASingleLine: false
# to be determined (0 = unlimited)
ColumnLimit: 80
# int * example;
PointerAlignment: Middle
# 'include' reordering might break the code
IncludeCategories:
  - Regex: '^<chiaki/.*\.h>'
    Priority: 2
  - Regex: '^<.*\.h>'
    Priority: 1
  - Regex: '^<.*'
    Priority: 2
  - Regex: '.*'
    Priority: 3
SortIncludes: 'true'
Standard: Cpp11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions