fix(lint): handle :tangle-generated .lisp files
This commit is contained in:
12
.github/workflows/lint.yml
vendored
12
.github/workflows/lint.yml
vendored
@@ -43,11 +43,15 @@ jobs:
|
|||||||
[ -f "$f" ] || continue
|
[ -f "$f" ] || continue
|
||||||
org="${f%.lisp}.org"
|
org="${f%.lisp}.org"
|
||||||
[ -f "$org" ] && continue
|
[ -f "$org" ] && continue
|
||||||
# Check if it's a test file tangled from a test block in an org
|
|
||||||
base=$(basename "$f" .lisp)
|
base=$(basename "$f" .lisp)
|
||||||
parent_org="${base%-tests}.org"
|
# Check if generated from a parent org via :tangle
|
||||||
if [ -f "harness/$parent_org" ] || [ -f "skills/$parent_org" ]; then
|
parent="${base%-tests}.org"
|
||||||
: # test files are generated from parent org
|
parent="${parent%-validator}.org"
|
||||||
|
parent="${parent%-client}.org"
|
||||||
|
if [ -f "harness/$parent" ] || [ -f "skills/$parent" ]; then
|
||||||
|
: # generated from parent org via :tangle
|
||||||
|
elif grep -q ":tangle.*$(basename "$f")" harness/*.org skills/*.org 2>/dev/null; then
|
||||||
|
: # :tangle reference found in another org
|
||||||
else
|
else
|
||||||
echo "WARNING: $f has no corresponding .org source"
|
echo "WARNING: $f has no corresponding .org source"
|
||||||
FAIL=1
|
FAIL=1
|
||||||
|
|||||||
Reference in New Issue
Block a user