Skip to content

Commit

Permalink
run-checks: remove manual check for testtime in favor of lint
Browse files Browse the repository at this point in the history
Signed-off-by: Oliver Calder <[email protected]>
  • Loading branch information
olivercalder committed Nov 13, 2024
1 parent dc40fa8 commit 8eaf3c2
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions run-checks
Original file line number Diff line number Diff line change
Expand Up @@ -241,21 +241,6 @@ if [ "$STATIC" = 1 ]; then
exit 1
fi

echo "Checking for usages of testtime outside of test code"
got=""
for dir in $(go list -f '{{.Dir}}' ./... | grep -v '/vendor/' ); do
s="$(grep -nP --exclude '*_test.go' --exclude 'testtime/*.go' 'testtime' "$dir"/*.go || true)"
if [ -n "$s" ]; then
got="$s\\n$got"
fi
done

if [ -n "$got" ]; then
echo 'Found usages of testtime outside of test code:'
echo "$got"
exit 1
fi

if command -v shellcheck >/dev/null; then
exclude_tools_path=tests/lib/external/snapd-testing-tools
echo "Checking shell scripts..."
Expand Down

0 comments on commit 8eaf3c2

Please sign in to comment.