From f4d6033dd83f5fe4ae63030cad71294590808295 Mon Sep 17 00:00:00 2001 From: davidlion Date: Sun, 2 Jun 2024 23:07:41 -0400 Subject: [PATCH] create compile commands.json for clang tidy --- .github/workflows/lint.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f5105f6..140404a 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,4 +1,4 @@ -name: "lint" +name: "Lint" on: push: pull_request: @@ -48,8 +48,13 @@ jobs: - name: "Linux: install clang/llvm" if: "${{ matrix.os == 'ubuntu-latest' }}" run: | - curl --proto "=https" --tlsv1.2 -sSf https://apt.llvm.org/llvm.sh | - sudo bash -s -- 16 all + curl --proto "=https" --tlsv1.2 -sSf https://apt.llvm.org/llvm.sh | + sudo bash -s -- 16 all + + - name: "Build for compile commands.json" + run: | + cmake -S cpp/ -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=1 + ln -s build/compile_commands.json . - name: "Clang format" run: |