Skip to content

Commit 4de8d11

Browse files
[HOTFIX] Fix for make-lint via PR #489
- [x] Closes GHI #488 Changes in file .github/tools/checkmake.bash: * fix for #488 Changes in file Makefile: * added 'all' target
2 parents d7be67e + ba6f918 commit 4de8d11

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

.github/tools/checkmake.bash

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,20 @@ process_checkmake_output() {
155155
local file="$1"
156156
local emsg="$2"
157157

158-
if ! output=$(checkmake "${file}" 2>&1); then
159-
printf "%s\n" "::error::checkmake failed!"
158+
# PATCH for GHI reactive-firewall-org/multicast#488
159+
local random_id="${RANDOM}${RANDOM}${RANDOM}${RANDOM}${RANDOM}"
160+
local chmk_elog="checkmake_${random_id}_error_log.log"
161+
162+
# Clean up on normal exit, but preserve on error for debugging
163+
trap "rm -f '${chmk_elog}' 2>/dev/null || :" EXIT ;
164+
165+
if ! output=$(checkmake "${file}" 2>"${chmk_elog}"); then
166+
# On failure, preserve log by removing trap
167+
trap - EXIT
168+
printf "%s\n" "::error title='failure'::checkmake failed!"
169+
local error_log
170+
error_log=$(head -n 5000 "${chmk_elog}")
171+
printf "%s '%s'\n" "::error title='stderr'::checkmake error:" "$error_log" >&2
160172

161173
printf "%s\n" "${output}" | \
162174
sed -e 's/ /:/g' | \

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,9 @@ user-install: ./dist
532532
$(QUIET)$(WAIT)
533533
$(QUIET)$(ECHO) "$@: Done."
534534

535+
all: init build test-reqs test-mat test-style docs-reqs build-docs
536+
$(QUIET)$(DO_FAIL) ;
537+
535538
%:
536539
$(QUIET)$(ECHO) "No Rule Found For $@" 1>&2 ;
537540
$(QUIET)$(WAIT) ;

0 commit comments

Comments
 (0)