Skip to content

Add trunk linter

Add trunk linter #9

Workflow file for this run

name: Lint
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
checks: write
jobs:
trunk_check:
name: Trunk Check
runs-on: ubuntu-latest
permissions:
checks: write # For trunk to post annotations
contents: read # For repo checkout
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build with ESP-IDF
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v5.5.2
target: esp32c6
- name: Fix compile_commands.json paths
run: |
# Replace Docker container paths with relative paths for trunk linter
# Copy first since build/ has restricted permissions from Docker
sed 's|/project/|./|g' build/compile_commands.json > compile_commands.json
- name: Trunk Check
uses: trunk-io/trunk-action@v1