@@ -52,20 +52,11 @@ jobs:
5252 pandoc --version || { print_error "Pandoc installation failed." 40 41 ; exit 126; }
5353 - name : Lint Workflow YAML
5454 if : ${{ success() }}
55+ env :
56+ YAML_ARGS : " ${{ vars.YAML_ARGS }}"
5557 run : |
56- YAML_ARGS="${{ vars.YAML_ARGS }}"
57- if [[ "${YAML_ARGS}" =~ ^*[!a-zA-Z0-9\ \-\.]*$ ]]; then
58- ERR_MSG_STUB="Invalid YAML_ARGS: contains unauthorized characters!"
59- ERR_LOC="file=.github/workflows/makefile-lint.yml,line=56,endLine=57,"
60- printf "::error %s%s\n" "${ERR_LOC}" "title=VALIDATION_ERROR::ERROR ${ERR_MSG_STUB}"
61- exit 1
62- else
63- printf "::notice file=.github/workflows/makefile-lint.yml,%s %s\n" \
64- "line=67,endLine=67,title=Validation::Validating workflow with args:" \
65- "${YAML_ARGS}"
66- read -ra ARGS <<< "${YAML_ARGS}"
67- yamllint "${ARGS[@]}" .github/workflows/makefile-lint.yml
68- fi
58+ printf "Validating workflow with args: %s\n" "${YAML_ARGS}"
59+ yamllint ${YAML_ARGS} .github/workflows/makefile-lint.yml
6960 - name : Install checkmake
7061 if : ${{ success() }}
7162 env :
8576 fi
8677 make && make install || { \
8778 ERR_MSG_STUB="Checkmake build failed." \
88- ERR_DETS="file=.github/workflows/makefile-lint.yml,line=86 ,endLine=92 ,title=FAILURE" \
79+ ERR_DETS="file=.github/workflows/makefile-lint.yml,line=77 ,endLine=83 ,title=FAILURE" \
8980 ERR_MSG_LINE="::error ${ERR_DETS}::ERROR ${ERR_MSG_STUB}" \
9081 printf "%s\n" "${ERR_MSG_LINE}" \
9182 exit 1 \
@@ -120,10 +111,10 @@ jobs:
120111 "${file_stub}" "${line_start}" "${line_end}" "${msg}"
121112 }
122113 if [ ! -x "$TOOL_PATH" ]; then
123- { print_error "$TOOL_PATH not found or not executable." 122 124 ; exit 1; } ;
114+ { print_error "$TOOL_PATH not found or not executable." 114 114 ; exit 1; } ;
124115 fi
125116 FILE="${{ steps.makefiles.outputs.files }}" ;
126117 printf "::group::%s\n" "${FILE}" ;
127- "$TOOL_PATH" "${FILE}" || { print_error "Linting failed." 127 127 ; exit 1; } ;
118+ "$TOOL_PATH" "${FILE}" || { print_error "Linting failed." 118 118 ; exit 1; } ;
128119 printf "::endgroup::\n" ; unset FILE 2>/dev/null || true ;
129120 if : ${{ !cancelled() && steps.makefiles.outputs.files != '' }}
0 commit comments