Skip to content

Commit 5b50ebe

Browse files
[PATCH] minor fixes (- WIP PR #184 -)
Changes in file .github/workflows/makefile-lint.yml: - fix for error path Changes in file .github/workflows/markdown-lint.yml: - fix for error path Changes in file tests/check_pip: - minor quoting improvements for stability
1 parent 2381686 commit 5b50ebe

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

.github/workflows/makefile-lint.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
sudo apt-get update || exit 1
2626
sudo apt-get install -y yamllint golang-go pandoc || exit 1
2727
ERR_MSG_STUB="Go installation failed."
28-
ERR_DETAILS="file=.github/workflow/makefile-lint.yml,line=25,endLine=30,title=FAILURE"
28+
ERR_DETAILS="file=.github/workflows/makefile-lint.yml,line=25,endLine=30,title=FAILURE"
2929
ERR_MSG_LINE="::error ${ERR_DETAILS}::ERROR ${ERR_MSG_STUB}"
3030
go version || { printf "%s\n" "${ERR_MSG_LINE}"; exit 1; }
3131
- name: Lint Workflow YAML
@@ -45,14 +45,14 @@ jobs:
4545
ACTUAL_SHA=$(git rev-parse HEAD)
4646
if [ "$EXPECTED_SHA" != "$ACTUAL_SHA" ]; then
4747
ERR_MSG_STUB="Checkmake repository hash verification failed."
48-
ERR_DETAILS="file=.github/workflow/makefile-lint.yml,line=42,endLine=51,title=FAILURE"
48+
ERR_DETAILS="file=.github/workflows/makefile-lint.yml,line=42,endLine=51,title=FAILURE"
4949
ERR_MSG_LINE="::error ${ERR_DETAILS}::ERROR ${ERR_MSG_STUB}"
5050
printf "%s\n" "${ERR_MSG_LINE}"
5151
exit 1;
5252
fi
5353
make || { \
5454
ERR_MSG_STUB="Checkmake build failed." \
55-
ERR_DETS="file=.github/workflow/makefile-lint.yml,line=52,endLine=57,title=FAILURE" \
55+
ERR_DETS="file=.github/workflows/makefile-lint.yml,line=52,endLine=57,title=FAILURE" \
5656
ERR_MSG_LINE="::error ${ERR_DETS}::ERROR ${ERR_MSG_STUB}" \
5757
printf "%s\n" "${ERR_MSG_LINE}" \
5858
exit 1; \
@@ -80,7 +80,7 @@ jobs:
8080
if [ ! -x "$TOOL_PATH" ]; then
8181
{ \
8282
ERR_MSG_STUB="$TOOL_PATH not found or not executable." \
83-
ERR_DETS="file=.github/workflow/makefile-lint.yml,line=79,endLine=88,title=FAILURE" \
83+
ERR_DETS="file=.github/workflows/makefile-lint.yml,line=79,endLine=88,title=FAILURE" \
8484
ERR_MSG_LINE="::error ${ERR_DETS}::ERROR ${ERR_MSG_STUB}" \
8585
printf "%s\n" "${ERR_MSG_LINE}" \
8686
exit 1; \
@@ -89,7 +89,7 @@ jobs:
8989
FILE="${{ steps.makefiles.outputs.files }}" ;
9090
printf "::group::%s\n" "${FILE}" ;
9191
ERR_MSG_STUB="Linting failed."
92-
ERR_DETS="file=.github/workflow/makefile-lint.yml,line=89,endLine=97,title=FAILURE"
92+
ERR_DETS="file=.github/workflows/makefile-lint.yml,line=89,endLine=97,title=FAILURE"
9393
ERR_MSG_LINE="::error ${ERR_DETS}::ERROR ${ERR_MSG_STUB}"
9494
"$TOOL_PATH" "${FILE}" || { printf "%s\n" "${ERR_MSG_LINE}"; exit 1; } ;
9595
printf "::endgroup::\n" ; unset FILE 2>/dev/null || true ;

.github/workflows/markdown-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
sudo apt-get update
2727
sudo apt-get install -y yamllint npm
2828
ERR_MSG_STUB="yamllint installation failed."
29-
ERR_DETAILS="file=.github/workflow/markdown-lint.yml,line=26,endLine=31,title=FAILURE"
29+
ERR_DETAILS="file=.github/workflows/markdown-lint.yml,line=26,endLine=31,title=FAILURE"
3030
ERR_MSG_LINE="::error ${ERR_DETAILS}::ERROR ${ERR_MSG_STUB}"
3131
yamllint --version || { printf "%s\n" "${ERR_MSG_LINE}"; exit 1; }
3232

tests/check_pip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ function check_license_when_given_req() {
243243
temp_dir=$(mktemp -d)
244244

245245
# Enter the temporary directory
246-
cd "$temp_dir"
246+
cd "${temp_dir}"
247247

248248
# Create a virtual environment using venv
249249
python3 -m venv venv
@@ -302,7 +302,7 @@ if [[ ("${EXIT_CODE}" -eq 0) ]] ; then
302302
# THIS IS THE ACTUAL TEST
303303
printf "::debug::%s\n" "Starting checks ..." ;
304304
# Iterate over files and run checks
305-
for req_file in $FILES_TO_CHECK; do
305+
for req_file in ${FILES_TO_CHECK} ; do
306306
printf "::group::%s\n" "Checking ${req_file}" ;
307307
if [[ ( -x $(command -v pip-audit) ) ]] && [[ ("${EXIT_CODE}" -eq 0) ]] ; then
308308
printf "::debug::%s\n" "Auditing ${req_file} for security vulnerabilities ..."

0 commit comments

Comments
 (0)