rename Flyout/FlyoutState to Tooltip/TooltipState, improve qmllint check script

This commit is contained in:
Damocles 2026-04-24 22:33:26 +02:00
parent 0c955f93f8
commit e5e15f82fb
12 changed files with 82 additions and 57 deletions

View file

@ -148,24 +148,49 @@
-I shell/modules -I shell/services -I shell/applets -I shell/lock \
shell/shell.qml shell/modules/*.qml shell/services/*.qml \
shell/applets/*.qml shell/lock/*.qml \
> $TMPDIR/output.txt 2>&1 || true
> $TMPDIR/raw.txt 2>&1 || true
# Extract unique warning messages (file:message, without line numbers)
grep -E "^Warning:" $TMPDIR/output.txt \
grep -E "^Warning:" $TMPDIR/raw.txt \
| sed 's/^Warning: //' \
| sed 's/\([^:]*\):[0-9]*:[0-9]*: /\1: /' \
| sort -u > $TMPDIR/current.txt
# Diff against known baseline - new warnings = failure
if ! diff -u test/qmllint-baseline.txt $TMPDIR/current.txt > $TMPDIR/diff.txt 2>&1; then
new=$(grep '^+[^+]' $TMPDIR/diff.txt || true)
if [ -n "$new" ]; then
echo "qmllint found new warnings not in baseline:"
echo "$new"
exit 1
# Compare against baseline
touch $TMPDIR/new-warnings.txt $TMPDIR/stale-warnings.txt
while IFS= read -r line; do
if ! grep -qFx "$line" test/qmllint-baseline.txt 2>/dev/null; then
echo "$line" >> $TMPDIR/new-warnings.txt
fi
done < $TMPDIR/current.txt
while IFS= read -r line; do
if ! grep -qFx "$line" $TMPDIR/current.txt; then
echo "$line" >> $TMPDIR/stale-warnings.txt
fi
done < test/qmllint-baseline.txt
# Output dir with individual files for inspection
mkdir -p $out
cp $TMPDIR/raw.txt $out/raw.txt
cp $TMPDIR/current.txt $out/current.txt
cp test/qmllint-baseline.txt $out/baseline.txt
cp $TMPDIR/new-warnings.txt $out/new-warnings.txt
cp $TMPDIR/stale-warnings.txt $out/stale-warnings.txt
failed=0
if [ -s $TMPDIR/new-warnings.txt ]; then
echo "new warnings:"
sed 's/^/ /' $TMPDIR/new-warnings.txt
failed=1
fi
cp $TMPDIR/output.txt $out
if [ -s $TMPDIR/stale-warnings.txt ]; then
echo "stale warnings:"
sed 's/^/ /' $TMPDIR/stale-warnings.txt
failed=1
fi
[ "$failed" -eq 0 ] || exit 1
'';
nova-stats-clippy = (pkgs.callPackage ./nix/stats-daemon.nix { }).overrideAttrs (old: {
pname = "nova-stats-clippy";