<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/124719>124719</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-tidy support for `InheritConfigPath`
</td>
</tr>
<tr>
<th>Labels</th>
<td>
clang-tidy
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
thorsten-klein
</td>
</tr>
</table>
<pre>
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'
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0Vk1v4zYQ_TX0ZWCDpvx50MH7YSC3RVtgeyvG1EiahiZVkrKjf19QkhPFzWYDLAoIiWFxnt_Me28kDIErS5SL9Sex_jLDNtbO5-lPiGTnj4bYzk6u6PLvBDVeCEpnjLuyraDx7m_SEQLFthHyIDZyvORBfFViv0rX8GEnnz9AqNF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