[clang-format] Skip Indentation on anonymous namespaces
Open
clang-format
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
It would be nice to have an option for clang-format to skip the indentation on anonymous namespaces only.
**Current Behavior**:
```
namespace {
void anon_func(); // is indented
}
```
**Desired Behavior**:
```
namespace {
void anon_func(); // do not indent
}
```
Contributor guide
Research direction
Start with clang-format's handling of anonymous namespaces and locate the relevant formatting tests. Add an option that leaves declarations in anonymous namespaces unindented, then verify formatting matches the desired behavior while other namespace indentation remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100