From 86daadff859d0edef973436697e0fbc963adde02 Mon Sep 17 00:00:00 2001 From: Joe Mancuso Date: Wed, 20 Nov 2024 18:52:51 -0500 Subject: [PATCH] Handle empty file lists in Radon analysis workflow to prevent errors --- .github/workflows/radon-analysis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/radon-analysis.yml b/.github/workflows/radon-analysis.yml index 91278b34..ad1b8113 100644 --- a/.github/workflows/radon-analysis.yml +++ b/.github/workflows/radon-analysis.yml @@ -14,9 +14,9 @@ jobs: run: pip install radon - name: Create Radon's reports run: | - radon cc $(git diff --name-only 2.0...HEAD) -j >cc.json - radon mi $(git diff --name-only 2.0...HEAD) -j >mi.json - radon hal $(git diff --name-only 2.0...HEAD) -j >hal.json + radon cc $(git diff --name-only 2.0...HEAD || echo "no_files") -j >cc.json + radon mi $(git diff --name-only 2.0...HEAD || echo "no_files") -j >mi.json + radon hal $(git diff --name-only 2.0...HEAD || echo "no_files") -j >hal.json - name: Comment the results on the PR uses: Libra-foundation/radon-comment@v0.1 with: