Change the include directories for linked components to use SYSTEM includes rather than normal ones. (IDFGH-14015) #14838
Labels
Resolution: Won't Do
This will not be worked on
Status: Done
Issue is done internally
Type: Feature Request
Feature request for IDF
Is your feature request related to a problem?
When using a language server such as clangd, the language server adds inline warning/error diagnostics to the code in your editor.
These language servers usually parse your compile_commands.json to figure out which files belong to your projects and which compiler flags you've used.
If a macro is imported by a header that is not included using
-isystem
rather than-I
warnings stemming from the expanded macro will be shown in the file where the macro is used.An example is that when you use clang-tidy, all ESP_LOG* macros will be highlighted with a warning for clang-tidy's
avoid-do-while
rule:As an example, I want the rule enabled because our internal code standards require it, but I don't have to change vendor code so the warning is just useless/added noise.
Describe the solution you'd like.
I would appreciate it if esp-components (such as esp_log) would export their include directories as SYSTEM so that I don't get warnings from code I can't change in my own code.
Describe alternatives you've considered.
I've attempted to use CMake scripting to edit all include directories on the
main
target that starts with/opt/esp
(my installation directory) so that they are removed from my target and re-added as a system include but couldn't get it to work.Additional context.
No response
The text was updated successfully, but these errors were encountered: