Closed vadi2 closed 1 year ago
Looks like the emitted diagnostic is:
{
'DiagnosticName': 'readability-function-cognitive-complexity',
'DiagnosticMessage': {
'Message': "function 'textAroundOffset' has cognitive complexity of 31 (threshold 25)",
'FilePath': '/github/workspace/src/TAccessibleTextEdit.cpp',
'FileOffset': 13337,
'Replacements': []},
'Notes': [
{'Message': '+1',
'FilePath': '/github/workspace/src/TAccessibleTextEdit.cpp',
'FileOffset': 13713, 'Replacements': []},
{'Message': "expanded from macro 'Q_ASSERT_X'",
'FilePath': '../../Qt/5.14.1/gcc_64/include/QtCore/qglobal.h',
'FileOffset': 30235, 'Replacements': []}, ...
You can see the second message has a relative path, which clang-tidy-review
is interpreting as being relative to where it's being run, but it should actually be relative to the top-level FilePath
for this diagnostic.
That shouldn't be too difficult to fix, I just need to find time to do so!
This is still an issue with 0.9.0 unfortunately, if anyone could take this on =)
Do you know if this is still a problem with the latest version?
I'm guessing it has to do with the fact that machine folders aren't accessible to the Docker image. Can that limitation be worked around, ie, can the machine folders be exposed to Docker?
Ah, yes, of course, that will be it. Unfortunately, it's a hard limitation of Docker that only subdirectories of the Dockerfile are able to be imported or copied into the image. You can map directories into a container when you run it, but unless things have changed recently, there's no way to supply those arguments.
So two possible workarounds:
clang-tidy-review
python package and use that directly, though you'll need to supply all the arguments and make sure you have the appropriate clang-tidy
installed
My workflow installs Qt to
Qt5_DIR
(standard variable) which is/home/runner/work/Mudlet/Mudlet/Qt/5.14.1/gcc_64
. That works fine for compiling purposes, but the clang-tidy-review action then tries to access an invalid path:https://github.com/Mudlet/Mudlet/runs/5349151395?check_suite_focus=true