Closed
Description
I see. Thanks for answer. Thanks for this action and your time to support!
Meanwhile, I run into another issue with regard to clang tidy's database (I'm not sure to open another issue - it's at yours). My action looks like
- name: clang-format & clang-tidy
uses: cpp-linter/[email protected]
id: linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
style: file
version: 14
# directory containing compilation database (compile_commands.json)
database: build/ci-linux-clang
# don't use action's default
tidy-checks: ''
where CMakePresets.json
contains
...
"configurePresets": [
{
"name": "use-ninja",
"generator": "Ninja",
"cacheVariables": { "CMAKE_EXPORT_COMPILE_COMMANDS": "ON" }
},
{
"name": "default-dirs",
"binaryDir": "${sourceDir}/build/${presetName}",
...
},
...
The action's log shows that it fails:
Run cpp-linter/[email protected]
/usr/bin/docker run --name f1554a9d49084b68a4119971e2b6f8bf850d2_02701c --label 6f1554 --workdir /github/workspace --rm -e CONAN_V2_MODE -e GITHUB_TOKEN -e INPUT_STYLE -e INPUT_VERSION -e INPUT_DATABASE -e INPUT_TIDY-CHECKS -e INPUT_THREAD-COMMENTS -e INPUT_EXTENSIONS -e INPUT_REPO-ROOT -e INPUT_VERBOSITY -e INPUT_LINES-CHANGED-ONLY -e INPUT_FILES-CHANGED-ONLY -e INPUT_IGNORE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/gh-actions-test/gh-actions-test":"/github/workspace" 6f1554:a9d49084b68a4119971e2b6f8bf850d2 "--style=file" "--extensions=c,h,C,H,cpp,hpp,cc,hh,c++,h++,cxx,hxx" "--tidy-checks=" "--repo-root=." "--version=14" "--verbosity=10" "--lines-changed-only=false" "--files-changed-only=true" "--thread-comments=false" "--ignore=.github" "--database=build/ci-linux-clang"
INFO:CPP Linter:Ignoring the following paths/files:
./.github
INFO:CPP Linter:processing push event
Event json from the runner
Get list of specified source files
Performing checkup on source/main.cpp
INFO:CPP Linter:Running "clang-tidy-14 --export-fixes=clang_tidy_output.yml -p /home/runner/work/gh-actions-test/build/ci-linux-clang source/main.cpp"
DEBUG:CPP Linter:Output from clang-tidy:
/github/workspace/source/main.cpp:4:10: error: 'fmt/format.h' file not found [clang-diagnostic-error]
Otherwise, running VS Code's devcontainer shows relative path seems to work:
vscode ➜ /workspaces/gh-actions-test (main ✗) $ clang-tidy-14 --export-fixes=clang_tidy_output.yml -p build/ci-linux-clang source/main.cpp
68700 warnings generated.
Suppressed 68700 warnings (68698 in non-user code, 2 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
I haven't the experience with clang-tidy using CLI arguments and python, so my guess is that's there is a wrong path (otherwise not very likely) :(
If relevant, the action is here
Originally posted by @ibis-hdl in #64 (comment)