Skip to content

cpp-linter complains about gtest headers #378

@leeoocca

Description

@leeoocca

What events trigger your workflow?

on:
  pull_request:
    types: [opened, reopened, synchronize, ready_for_review]
    paths:
      - '**.cpp'
      - '**.hpp'

What OS does your workflow use?

runs-on: ubuntu-latest

How is cpp-linter-action configured?

- uses: cpp-linter/cpp-linter-action@v2
        id: linter
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          style: 'file'  # Use .clang-format config file
          tidy-checks: '' # Use .clang-tidy config file
          # only 'update' a single comment in a pull request thread.
          thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}

What was the unexpected behavior?

Workflow fails with:

'gtest/gtest.h' file not found

One solution is to ignore the files, but then I lose the check.

Is there a way to fix the issue? Should I fetch dependencies in a previous step?

Metadata

Metadata

Assignees

No one assigned

    Labels

    compilation 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