Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,21 +85,21 @@ pkg-test-%: packages/%
@mkdir -p $(LOGS_DIR)
@rm -f $(LOGS_DIR)/$*.failed
@bash -c 'set -o pipefail; \
UV_CACHE_DIR="$(CURDIR)/.uv-cache/$*" PYTHONUNBUFFERED=1 uv run --isolated --directory $< pytest 2>&1 | tee $(LOGS_DIR)/$*.log; \
PYTHONUNBUFFERED=1 uv run --isolated --directory $< pytest 2>&1 | tee $(LOGS_DIR)/$*.log; \
rc=$$?; \
if [ $$rc -ne 0 ] && [ $$rc -ne 5 ]; then \
touch $(LOGS_DIR)/$*.failed; \
fi; \
true'
else
pkg-test-%: packages/%
UV_CACHE_DIR="$(CURDIR)/.uv-cache/$*" uv run --isolated --directory $< pytest || [ $$? -eq 5 ]
uv run --isolated --directory $< pytest || [ $$? -eq 5 ]
endif

pkg-ty-%: packages/%
uv run --isolated --directory $< ty check .

pkg-test-all: $(addprefix pkg-test-,$(PKG_TARGETS))
pkg-test-all: sync $(addprefix pkg-test-,$(PKG_TARGETS))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Declare pkg-test-all as phony to avoid accidental no-op builds.

If a file/directory named pkg-test-all exists, make can treat the target as up-to-date and skip running the package tests.

Suggested fix
+.PHONY: pkg-test-all
 pkg-test-all: sync $(addprefix pkg-test-,$(PKG_TARGETS))
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
pkg-test-all: sync $(addprefix pkg-test-,$(PKG_TARGETS))
.PHONY: pkg-test-all
pkg-test-all: sync $(addprefix pkg-test-,$(PKG_TARGETS))
🧰 Tools
🪛 checkmake (0.3.2)

[warning] 102-102: Target "pkg-test-all" should be declared PHONY.

(phonydeclared)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@python/Makefile` at line 102, The `pkg-test-all` target is not declared as a
phony target in the Makefile, which can cause Make to skip execution if a file
or directory named `pkg-test-all` exists. Add `pkg-test-all` to the `.PHONY`
declaration at the top of the Makefile alongside other phony targets to ensure
this target always executes regardless of filesystem state.

Source: Linters/SAST tools


ifdef LOGS_DIR
test-report:
Expand Down
Loading