Why does user config have the highest precedence instead of the lowest? #1193
Unanswered
khuldraeseth
asked this question in
Q&A
Replies: 1 comment 3 replies
-
I suspect the thinking is that project configuration is likely to be checked into the project's repository and thus shared by all developers, and individual developers may want to be able to override aspects of the shared configuration. You can add things to user config that only apply to one project, as follows:
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
From the docs, I see that the order of precedence is user config > inner project > outer project. The order fragments are applied in practice matches, with user config coming last. I would expect inner > outer > user instead, to allow each project to provide its own
.clangd
that can override whatever opinionated configuration I have in my user config.A concrete example is this very project. I have the clang-tidy check
modernize-use-trailing-return-type
enabled in my user config, but the clangd source doesn't use trailing return types. A project configurationDiagnostics.ClangTidy.Remove: modernize-use-trailing-return-type
does not remove the check because it's applied before the check is added.Beta Was this translation helpful? Give feedback.
All reactions