From e8c5a5346bda7459cd24591b9e4e38ecc2abcdcb Mon Sep 17 00:00:00 2001 From: Dominique RIGHETTO Date: Tue, 1 Nov 2022 15:55:59 +0100 Subject: [PATCH] Update and rename check-file-for starting-slash to check-file-for-starting-slash --- .bin/check-file-for starting-slash | 9 --------- .bin/check-file-for-starting-slash | 12 ++++++++++++ 2 files changed, 12 insertions(+), 9 deletions(-) delete mode 100644 .bin/check-file-for starting-slash create mode 100644 .bin/check-file-for-starting-slash diff --git a/.bin/check-file-for starting-slash b/.bin/check-file-for starting-slash deleted file mode 100644 index d7d5a44b..00000000 --- a/.bin/check-file-for starting-slash +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env bash -# Script to verify if a file contain any entries starting with a slash and show a warning into the github action result UI. -modified_file=$1 -echo "[+] Check $modified_file ..." -matches=$(grep -cE '^/[a-zA-Z0-9\._]+' $modified_file) -if [ $matches -ne 0 ] -then - echo "::warning file=$modified_file,line=1,col=1,endColumn=1::$matches entries start with a slash." -fi diff --git a/.bin/check-file-for-starting-slash b/.bin/check-file-for-starting-slash new file mode 100644 index 00000000..1f82e2ad --- /dev/null +++ b/.bin/check-file-for-starting-slash @@ -0,0 +1,12 @@ +#!/usr/bin/env bash +#Script to verify if a file contain any entries starting with a slash and show a warning into the github action result UI. +modified_files="$1" +for modified_file in modified_files +do + echo "[+] Check $modified_file ..." + matches=$(grep -cE '^/[a-zA-Z0-9\._]+' $modified_file) + if [ $matches -ne 0 ] + then + echo "::warning file=$modified_file,line=1,col=1,endColumn=1::$matches entries start with a slash." + fi +done