Skip to content

Commit 029da88

Browse files
committed
fix(arch): work around namcap bug on Arch Linux
Arch Linux's namcap lniter seems to have a bug. --exclude ignores all but the last rule specified, meaning --exclude=a,b,c behaves as --exclude=c. This causes our linting to fail. Work around this by grepping out the errors we intend to exclude.
1 parent a966bc5 commit 029da88

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

dist/arch/lint.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ trap 'rm -f "${errors}"' EXIT
2626
# check fails on libm. Even with -Wl,--as-needed, the linker keeps the NEEDED
2727
# entry, so I don't know how to work around the libm dependency.
2828
namcap --exclude=emptydir,symlink,unusedsodepends PKGBUILD-dev PKGBUILD-git PKGBUILD-release ./quick-lint-js-*.pkg.tar.zst |& tee "${errors}"
29+
# HACK(strager): --exclude doesn't work properly in namcap, probably as of
30+
# commit
31+
# <https://gitlab.archlinux.org/pacman/namcap/-/commit/6b19729433dd5c3d2d6be0d6f60732fefb006749>
32+
# (unconfirmed). Manually filter out errors that we wish to exclude.
33+
sed -i \
34+
-e '\,Directory (usr/src/debug/quick-lint-js-dev/quick-lint-js/build) is empty,d' \
35+
-e '\,Symlink (usr/lib/debug/\.build-id/5f/.*) points to non-existing \.\./\.\./\.\./\.\./bin/quick-lint-js,d' \
36+
"${errors}"
37+
2938
if [ -s "${errors}" ]; then
3039
printf 'error: namcap reported an error\n' >&2
3140
exit 1

0 commit comments

Comments
 (0)