You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that when setting an absolute path to the compilation database I receive wrong paths.
- name: Run clang-tidy and clang-format uses: cpp-linter/cpp-linter-action@v2id: linterenv:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}with:
style: filedatabase: ${{github.workspace}}/out/build/${{matrix.arch}}-${{env.BUILD_TYPE}}thread-comments: truestep-summary: true
Produces "D:\a\figures-counter\figures-counter\afigures-counterfigures-counter\out\build\x64-debug" instead of the correct path "D:\a\figures-counter\figures-counter\out\build\x64-debug"
The workaround is to omit the prefix and use relative path
I think what's happening here might be related to using a Windows runner. The var github.workspace lost all it path delimiters: afigures-counterfigures-counter. This makes me wonder what stripped them. Typically python strings with \ have to be doubled (\\) to escape the misinterpreted reg-exp token. Otherwise you'd get strings with tokens like \a that mean "literal a".
What perplexes me more is that drive letter D: was stripped as well. I think I have the details to reproduce, and hopefully I can find a fix for this.
Paths on windows will be passed to cpp-linter's python package using powershell in the next release. I still have to do a little more testing to make sure clang-tidy can actually find the database on Windows runners where the database option is given an absolute path.
Closing as stale: there has been no activity since December 2023 and path handling has changed substantially across the v2 releases since then. If the problem still reproduces on the current release, please open a new issue with a minimal example and the action output.
I never got a chance to verify this, but when we switched to nu shell script, the \ in windows paths should be treated as literals (not an escape char).
Activity
2bndy5 commentedon Jun 15, 2023
I think what's happening here might be related to using a Windows runner. The var
github.workspacelost all it path delimiters:afigures-counterfigures-counter. This makes me wonder what stripped them. Typically python strings with\have to be doubled (\\) to escape the misinterpreted reg-exp token. Otherwise you'd get strings with tokens like\athat mean "literal a".What perplexes me more is that drive letter
D:was stripped as well. I think I have the details to reproduce, and hopefully I can find a fix for this.2bndy5 commentedon Dec 11, 2023
Paths on windows will be passed to cpp-linter's python package using powershell in the next release. I still have to do a little more testing to make sure clang-tidy can actually find the database on Windows runners where the
databaseoption is given an absolute path.shenxianpeng commentedon Oct 15, 2026
Closing as stale: there has been no activity since December 2023 and path handling has changed substantially across the v2 releases since then. If the problem still reproduces on the current release, please open a new issue with a minimal example and the action output.
2bndy5 commentedon Oct 15, 2026
I never got a chance to verify this, but when we switched to nu shell script, the
\in windows paths should be treated as literals (not an escape char).