From 6316fed5d90d7a6bf5156b5acd39440ac4b2976c Mon Sep 17 00:00:00 2001 From: 0penBrain <48731257+0penBrain@users.noreply.github.com> Date: Thu, 16 Feb 2023 11:58:39 +0100 Subject: [PATCH] CI: uniformize sed usage --- .github/workflows/actions/linux/build/action.yml | 2 +- .github/workflows/actions/linux/configure/action.yml | 2 +- .github/workflows/actions/runTests/action.yml | 2 +- .github/workflows/sub_lint.yml | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/actions/linux/build/action.yml b/.github/workflows/actions/linux/build/action.yml index 69b9a996f1..63d6f7fdb1 100644 --- a/.github/workflows/actions/linux/build/action.yml +++ b/.github/workflows/actions/linux/build/action.yml @@ -65,7 +65,7 @@ runs: echo '```' >> ${{ inputs.reportFile }} echo "Build Log (only built targets reported):" >> ${{ inputs.reportFile }} echo '```' >> ${{ inputs.reportFile }} - cat ${{ inputs.logFile }} | sed -ne '/Built target/p' >> ${{ inputs.reportFile }} + cat ${{ inputs.logFile }} | sed -ne "/Built target/p" >> ${{ inputs.reportFile }} echo '```' >> ${{ inputs.reportFile }} echo "">> ${{ inputs.reportFile }} echo "" >> ${{ inputs.reportFile }} diff --git a/.github/workflows/actions/linux/configure/action.yml b/.github/workflows/actions/linux/configure/action.yml index 704adf1d99..e4b1f0e2ed 100644 --- a/.github/workflows/actions/linux/configure/action.yml +++ b/.github/workflows/actions/linux/configure/action.yml @@ -70,7 +70,7 @@ runs: echo "" >> ${{ inputs.reportFile }} echo "Configure Log (only final configuration values reported):" >> ${{ inputs.reportFile }} echo '```' >> ${{ inputs.reportFile }} - cat ${{ inputs.logFile }} | sed -ne '/^ *==/,/^====/p' >> ${{ inputs.reportFile }} + cat ${{ inputs.logFile }} | sed -ne "/^ *==/,/^====/p" >> ${{ inputs.reportFile }} echo '```' >> ${{ inputs.reportFile }} echo "">> ${{ inputs.reportFile }} echo "" >> ${{ inputs.reportFile }} diff --git a/.github/workflows/actions/runTests/action.yml b/.github/workflows/actions/runTests/action.yml index 7b120d4475..7723f1c6e3 100644 --- a/.github/workflows/actions/runTests/action.yml +++ b/.github/workflows/actions/runTests/action.yml @@ -43,7 +43,7 @@ runs: id: runTests shell: bash run: | - stdbuf -oL -eL ${{ inputs.testCommand }} |& sed -E '/[[:blank:]]*\([[:digit:]]{1,3} %\)[[:blank:]]*/d' | tee -a ${{ inputs.logFile }} + stdbuf -oL -eL ${{ inputs.testCommand }} |& sed -Ee "/[[:blank:]]*\([[:digit:]]{1,3} %\)[[:blank:]]*/d" | tee -a ${{ inputs.logFile }} - name: Write report shell: bash if: always() diff --git a/.github/workflows/sub_lint.yml b/.github/workflows/sub_lint.yml index d16773893f..09efdd4df3 100644 --- a/.github/workflows/sub_lint.yml +++ b/.github/workflows/sub_lint.yml @@ -244,7 +244,7 @@ jobs: for file in ${{ inputs.changedFiles }} do # Check for trailing whitespaces - grep -nIHE --exclude="$exclude" " $" $file | sed 's/$/<-- trailing whitespace/' >> ${{ env.logdir }}whitespace.log || true + grep -nIHE --exclude="$exclude" " $" $file | sed -e "s/$/<-- trailing whitespace/" >> ${{ env.logdir }}whitespace.log || true done # Write the Log to the console with the Problem Matchers if [ -f ${{ env.logdir }}whitespace.log ] @@ -279,7 +279,7 @@ jobs: # Check for Tab usage for file in ${{ steps.changed-files.outputs.all_changed_files }} do - grep -nIHE --exclude="$exclude" $'\t' $file | sed 's/$/ <-- contains tab/' >> ${{ env.logdir }}tab.log || true + grep -nIHE --exclude="$exclude" $'\t' $file | sed -e "s/$/ <-- contains tab/" >> ${{ env.logdir }}tab.log || true done # Write the Log to the console with the Problem Matchers if [ -f ${{ env.logdir }}tab.log ] @@ -313,7 +313,7 @@ jobs: # Check all files for QT string-based connections for file in ${{ inputs.changedFiles }} #TODO does this makes sense in Python files ? do - grep -nIHE --exclude="$exclude" $' SIGNAL| SLOT' $file | sed 's/$/ <--Consider using Functor-Based Connections/' >> ${{ env.logdir }}qtConnections.log || true #TODO seems to trigger false positives + grep -nIHE --exclude="$exclude" $' SIGNAL| SLOT' $file | sed -e "s/$/ <--Consider using Functor-Based Connections/" >> ${{ env.logdir }}qtConnections.log || true #TODO seems to trigger false positives done # Write the Log to the console with the Problem Matchers if [ -f ${{ env.logdir }}qtConnections.log ]; then