<div dir="ltr"><pre style="white-space:pre-wrap;color:rgb(0,0,0);text-decoration-style:initial;text-decoration-color:initial">I ran clang-tidy in the root directory of the source code of an application
(MPlayer-1.3.0). Precisely, I use run-clang-tidy.py python script, as
follows:
run-clang-tidy.py -header-filter='.*'
-checks='-*,readability-braces-around-statements' -fix
I ran clang-tidy in the root directory of the source code of an application
(MPlayer-1.3.0). Precisely, I use run-clang-tidy.py python script, as
follows:
run-clang-tidy.py -header-filter='.*'
-checks='-*,readability-braces-around-statements' -fix
The commands database is also stored in the root directory in a file named
compile_commands.json. After gathering all fixes, it tries to apply them
but no fix is applied on any of the source files compiled from the
*inner* directories.
Here is the first part of the error report:
Applying fixes ...Described file './libavutil/internal.h' doesn't
exist. Ignoring...Described file './libavutil/x86/intmath.h' doesn't
exist. Ignoring...Described file 'libavformat/internal.h' doesn't
exist. Ignoring...Described file './libavcodec/bytestream.h' doesn't
exist. Ignoring...Described file './libavcodec/flac.h' doesn't exist.
Ignoring...Described file './libavcodec/get_bits.h' doesn't exist.
Ignoring...Described file './libavcodec/internal.h' doesn't exist.
Ignoring...Described file './libavcodec/mathops.h' doesn't exist.
Ignoring...Described file './libavcodec/put_bits.h' doesn't exist.
Ignoring...Described file 'libavformat/matroskaenc.c' doesn't exist.
Ignoring...Described file 'libavformat/subtitles.h' doesn't exist.
Ignoring...Described file 'libavformat/apngdec.c' doesn't exist.
Ignoring......
These files are compiled using the Makefile located in the folder ffmpeg.
For example, libavformat/apngdec.c is located at ./ffmpeg/libavformat/
apngdec.c where .is the root directory of MPlayer-1.3.0. How can I fix the
problem?
It seems that the fixes exported in yaml format stored relative paths. This is because the compilation database generated using Bear is in that format. The paths should become absolute before being exported to yaml, similar to what is done at "clang-tools-extra-6.0.0/clang-tidy/ClangTidy.cpp:Line131".</pre></div>