Skip to content

Commit 721815d

Browse files
dheerajodhaclaude
andcommitted
refactor: clean up Makefile test and coverage commands
Remove unnecessary stderr redirections (2>&1 and 2>/dev/null) from TEST_CMD and COVERAGE_CMD. The mock functions in tests now properly prevent network calls, making error output suppression unnecessary. resolves: EC-1651 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 9c35014 commit 721815d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ TEST_CMD_DEFAULT=$(OPA) test $(TEST_FILES) $(TEST_FILTER)
3030
ifeq ($(shell command -v unshare),)
3131
TEST_CMD=$(TEST_CMD_DEFAULT)
3232
else
33-
TEST_CMD=$(EC) version > /dev/null 2>&1 && unshare -r -n $(TEST_CMD_DEFAULT) 2>/dev/null
33+
TEST_CMD=$(EC) version > /dev/null && unshare -r -n $(TEST_CMD_DEFAULT)
3434
endif
3535

3636
LICENSE_IGNORE=-ignore '.git/**' -ignore '.idea/**'
@@ -41,11 +41,11 @@ COVERAGE_CMD_DEFAULT=$(OPA) test --coverage --format json $(TEST_FILES)
4141
ifeq ($(shell command -v unshare),)
4242
COVERAGE_CMD=$(COVERAGE_CMD_DEFAULT)
4343
else
44-
COVERAGE_CMD=$(EC) version > /dev/null 2>&1 && unshare -r -n $(COVERAGE_CMD_DEFAULT)
44+
COVERAGE_CMD=$(EC) version > /dev/null && unshare -r -n $(COVERAGE_CMD_DEFAULT)
4545
endif
4646

4747
define COVERAGE
48-
@$(COVERAGE_CMD) 2>/dev/null | { \
48+
@$(COVERAGE_CMD) | { \
4949
T=$$(mktemp); tee "$${T}"; $(OPA) eval --format pretty \
5050
--input "$${T}" \
5151
--data hack/simplecov.rego \

0 commit comments

Comments
 (0)