From 22b56155943e5ceddb790b58ec94d46dd7f36a2b Mon Sep 17 00:00:00 2001 From: lanefu Date: Mon, 29 Jun 2020 23:18:17 -0400 Subject: [PATCH] try json output for future report tracking (#2072) * try json output for future report tracking * change bash env for shellcheck * changes shellcheck step name --- .github/workflows/testpr.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/testpr.yml b/.github/workflows/testpr.yml index f4ba3461e..b02329189 100644 --- a/.github/workflows/testpr.yml +++ b/.github/workflows/testpr.yml @@ -12,9 +12,13 @@ jobs: - name: Environment variables run: sudo -E bash -c set - name: Install required packages - run: sudo apt-get install shellcheck - - name: "lint libraries via shellcheck" - run: shellcheck --color -x -s bash -S warning -e SC2034,SC1090,SC2154,SC2153 lib/*.sh && echo "shellcheck lib/*.sh - OK"; + run: sudo apt-get install shellcheck jq + - name: "shellcheck lint error report json format" + shell: bash {0} + run: | + shellcheck -f json -x -s bash -S warning -e SC2034,SC1090,SC2154,SC2153 lib/*.sh > report.json + cat report.json |jq -C 'group_by(.file)|.[] | {file: [(limit(1;.[].file)), {shellcheck_codes: [{code: (group_by(.code)|.[] | limit(1;.[].code)), count: length}]}], file_error_count: length}' + #shellcheck --color -x -s bash -S warning -e SC2034,SC1090,SC2154,SC2153 lib/*.sh && echo "shellcheck lib/*.sh - OK"; build_sbc_kernel: name: Compile changed kernel # This job runs on self hosted Linux machine, with public label