Part Number: CODECOMPOSER
Tool/software:
Hello
I m working on integrating clang-tidy checks in a project in CCS 20
clangd help shows that a .clangd file can be used to configure options for a certain project
>clangd --help
...
--enable-config - Read user and project configuration from YAML files.
Project config is from a .clangd file in the project directory.
User config is from clangd/config.yaml in the following directories:
Windows: %USERPROFILE%\AppData\Local
Mac OS: ~/Library/Preferences/
Others: $XDG_CONFIG_HOME, usually ~/.config
and since .clang-tidy file is not currently spported; i was wondering if it would be possible to convert the clang-tidy format into the .clangd format and make clangd use it for the project
and in the same context, how can i use clangd in CI to generate reports on failed checks ?
in another approach, i tried using C:\ti\ccs2020\ccs\tools\compiler\ti-cgt-armllvm_4.0.3.LTS\bin\tiarmclang-tidy.exe compiler tool with the compile_commands.json file located under <ProjRoot>/<BuildConfig>/.clangd/
the tiarmclang-tidy tool doesn t work with this file
PS: I have a valid clang-tidy file in project root
>C:\ti\ccs2020\ccs\tools\compiler\ti-cgt-armllvm_4.0.3.LTS\bin\tiarmclang-tidy.exe -p Debug/.clangd gpio_toggle_output.c Error while processing <ProjPath>\gpio_toggle_output.c. error: no input files [clang-diagnostic-error] error: unable to handle compilation, expected exactly one compiler job in '' [clang-diagnostic-error] Found compiler error(s).
How can we generate a valid compile_commands.json file to use with tiarmclang-tidy; or maybe edit the file generated by clangd somehow to make it compatible
Best
Radhwen