Skip to content

Improve paths handling #155

Description

@ivancho-ifa

First of all, great Action!

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@v2
      id: linter
      env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
      with:
          style: file
          database: ${{github.workspace}}/out/build/${{matrix.arch}}-${{env.BUILD_TYPE}}
          thread-comments: true
          step-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

database: out/build/${{matrix.arch}}-${{env.BUILD_TYPE}}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    WindowsExecuted on WimdowsbugSomething isn't workingcompilation databaseclang-tidy didn't use a compilation database

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions