Skip to content

Commit

Permalink
Do not pass an empty string to shellcheck wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-cerny committed Jan 20, 2025
1 parent d478e31 commit b7d2d12
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions cmake/SSGCommon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,17 @@ macro(ssg_collect_remediations PRODUCT LANGUAGES)
string(REGEX REPLACE "version: " "" SHELLCHECK_VERSION "${SHELLCHECK_VERSION_LINE}")

if(SHELLCHECK_VERSION VERSION_GREATER_EQUAL "0.10.0")
set(SHELLCHECK_EXTENDED_ANALYSIS_OPTION "--extended-analysis=false")
add_test(
NAME "${PRODUCT}-bash-shellcheck"
COMMAND "${CMAKE_SOURCE_DIR}/utils/shellcheck_wrapper.sh" "${SHELLCHECK_EXECUTABLE}" "${CMAKE_BINARY_DIR}/${PRODUCT}/fixes/bash" -s bash -S warning "--extended-analysis=false"
)
else()
set(SHELLCHECK_EXTENDED_ANALYSIS_OPTION "")
add_test(
NAME "${PRODUCT}-bash-shellcheck"
COMMAND "${CMAKE_SOURCE_DIR}/utils/shellcheck_wrapper.sh" "${SHELLCHECK_EXECUTABLE}" "${CMAKE_BINARY_DIR}/${PRODUCT}/fixes/bash" -s bash -S warning
)
endif()
add_test(
NAME "${PRODUCT}-bash-shellcheck"
COMMAND "${CMAKE_SOURCE_DIR}/utils/shellcheck_wrapper.sh" "${SHELLCHECK_EXECUTABLE}" "${CMAKE_BINARY_DIR}/${PRODUCT}/fixes/bash" -s bash -S warning "${SHELLCHECK_EXTENDED_ANALYSIS_OPTION}"
)

endif()
endmacro()

Expand Down

0 comments on commit b7d2d12

Please sign in to comment.