| Issue |
124719
|
| Summary |
clang-tidy support for `InheritConfigPath`
|
| Labels |
clang-tidy
|
| Assignees |
|
| Reporter |
thorsten-klein
|
We have following project setup
```
└── shared_configs
└── .clang-tidy
└── project1
└── .clang-tidy
└── project2
└── project3
└── .clang-tidy -> shared_configs/.clang-tidy (symlink)
```
**Explanation**:
In the shared_configs directory we have a general .clang-tidy file which we want to share across all our repositories (git submodule).
By creating a symlink in the repository root pointing to `shared_configs/.clang-tidy` clang-tidy takes the correct config file.
Some projects might deviate from the official config.
For example projects they deactivate some checks via their individual config file `project1/.clang-tidy`:
```
# Inherit from general config
InheritParentConfig: true
# Disable some checks fpr this project
Checks: '-fuchsia-overloaded-operator'
```
**Feature Request**:
Why is only inheriting from a parent config allowed?
What we miss is the possibility to inherit from a specific config file.
So in other words we would like to have a single-source-of-truth for repository-wide deviations.
So we want to be able to inherit from the general config and additionally deactivate some checks.
Therefore I suggest some new option `InheritConfigPath` (which is analog to the already existing option `InheritParentConfig`).
With this option we could remove the symlink to `shared_configs/.clang-tidy` and each individual `projectX/.clang-tidy` config.
Instead we can use following config file at a central place (git root) = single point of truth for repository-wide deviations:
```
# Inherit from general config
InheritConfigPath: shared_configs/.clang-tidy
# Disable some checks repository-wide
Checks: '-fuchsia-overloaded-operator'
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs