diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml index 7cdfae6..686c010 100644 --- a/.trunk/trunk.yaml +++ b/.trunk/trunk.yaml @@ -13,6 +13,13 @@ repo: name: src lint: definitions: + # This repository is consumed as a submodule, so `.git` is a file whose + # gitdir is relative to the superproject. Trunk's sandbox copy breaks that + # relative path, so anchor the command at the real workspace. + - name: git-diff-check + commands: + - name: lint + run: git -C "${workspace}" diff --check ${target} - name: shfmt commands: - name: format