Skip to content

Commit

Permalink
checkpatch: Remove grouping logs in GHA output
Browse files Browse the repository at this point in the history
Grouping logs by commit in the output of the GitHub workflow provides a
nicer interface than just displaying separators, but it turns out to be
more cumbersome in case of errors, because users have no way to know
what group contains the error and they have to manually expand all
groups, which has proved annoying. There doesn't seem to be an option to
auto-expand the groups, so let's remove them altogether.

Signed-off-by: Quentin Monnet <[email protected]>
  • Loading branch information
qmonnet committed Feb 15, 2024
1 parent 4a5b72e commit 70d73bc
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions images/checkpatch/checkpatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,10 @@ check_commit() {
subject="$4"
gh_action="$5"

if [ -n "$gh_action" ]; then
echo "::group::{[$i/$nb_commits] $subject}"
echo "Running on $sha"
else
echo "========================================================="
echo "[$i/$nb_commits] Running on $sha"
echo -e "$HL_START$subject$HL_END"
echo "========================================================="
fi
echo "========================================================="
echo "[$i/$nb_commits] Running on $sha"
echo -e "$HL_START$subject$HL_END"
echo "========================================================="
# Recompute list of source files each time in case commit changes it
update_sources
(
Expand All @@ -166,9 +161,6 @@ check_commit() {
) || ret=1
# Apply custom checks on all commits, whether or not they touch bpf/
custom_checks "$sha" "$subject" "$gh_action"
if [ -n "$gh_action" ]; then
echo "::endgroup::"
fi
}

all_code=0
Expand Down

0 comments on commit 70d73bc

Please sign in to comment.