llvm / llvm/llvm-project

clang-format: InheritParentConfig doesn't apply parent's BreakAfterOpenBracket / BreakBeforeCloseBracket

Open
#184,880 2 comments 2 reactions 0 assignees View on GitHub
clang-format
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

```
$ clang-format --version
clang-format version 22.1.0 (https://github.com/llvm/llvm-project a79e01cff4a0954323b9c5427d95524d49e7fc32)
$ cat >.clang-format < BreakAfterOpenBracketIf: true
> EOF
$ mkdir subdir
$ cat >subdir/.clang-format < BasedOnStyle: InheritParentConfig
> BreakBeforeCloseBracketIf: true
> EOF
$ (cd subdir/ && clang-format --dump-config | grep BracketIf)
BreakAfterOpenBracketIf: false
BreakBeforeCloseBracketIf: true
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.