Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add style handling via .editorconfig and .clang-format #203

Closed
wants to merge 4 commits into from

Commits on Oct 1, 2024

  1. editorconfig: add initial config file

    Most editors support the config format out of the box and with some
    patches in the works, it's great to have something in-tree to avoid
    (further) mixing the style.
    
    The format is sufficient to handle basic indentation size/style and line
    length. More elaborate style tracking can be done with clang-format...
    incoming with a later patch.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    evelikov committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    0105408 View commit details
    Browse the repository at this point in the history
  2. .clang-format: import from Linux kernel as of v6.11.-rc6

    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    evelikov committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    b4a3def View commit details
    Browse the repository at this point in the history
  3. .clang-format: update for_each pattern and list

    Swap kernel list of for_each macros for what we actually use in-tree.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    evelikov committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    09fedac View commit details
    Browse the repository at this point in the history
  4. ci: add clang-format action

    It will help enforce the style defined in .clang-format, only for newly
    introduced changes. Pre-existing style issues will not be flagged,
    unless the lines are changed with given commit.
    
    If a particular section needs to be ignored, it should be wrapped in
    clang-format off/on section.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    evelikov committed Oct 1, 2024
    Configuration menu
    Copy the full SHA
    4ee4596 View commit details
    Browse the repository at this point in the history