Conversation
📝 WalkthroughWalkthroughIntroduces new Drone CI configuration and build automation scripts to orchestrate multi-platform testing workflows. The Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
An automated preview of the documentation is available at https://185.corosio.prtest3.cppalliance.org/index.html If more commits are pushed to the pull request, the docs will rebuild at the same URL. 2026-03-03 21:22:03 UTC |
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (1)
.drone/drone.sh (1)
83-83: Use[[ ... ]]with explicit&&/||for the coverity gate.Line [83] mixes
-aand-o, which is error-prone and harder to reason about in shell conditionals.Proposed refactor
-if [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$TRAVIS_BRANCH" = "develop" -o "$TRAVIS_BRANCH" = "master" \) -a \( "$DRONE_BUILD_EVENT" = "push" -o "$DRONE_BUILD_EVENT" = "cron" \) ] ; then +if [[ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" && + ( "$TRAVIS_BRANCH" == "develop" || "$TRAVIS_BRANCH" == "master" ) && + ( "$DRONE_BUILD_EVENT" == "push" || "$DRONE_BUILD_EVENT" == "cron" ) ]]; then cd $BOOST_ROOT/libs/$SELF ci/travis/coverity.sh fi🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.drone/drone.sh at line 83, The conditional using single-bracket test on the COVERITY gate is using -a/-o which is error-prone; replace the if that tests COVERITY_SCAN_NOTIFICATION_EMAIL, TRAVIS_BRANCH, and DRONE_BUILD_EVENT with a bash-style conditional using [[ ... ]] and combine checks with explicit && and || (e.g., test -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" && (TRAVIS_BRANCH == "develop" || TRAVIS_BRANCH == "master") && (DRONE_BUILD_EVENT == "push" || DRONE_BUILD_EVENT == "cron")) so the logical grouping is explicit and reliable; update the if line in .drone/drone.sh accordingly (refer to the existing if statement that currently uses -n, -a and -o).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.drone/drone.bat:
- Around line 21-24: The git clones of boost-ci currently fetch moving HEAD;
update each clone invocation (the git clone commands that create boost-ci-cloned
in this file — e.g., the occurrences at the shown block and the other sites
noted) to pin to a specific immutable ref by either cloning a named tag/branch
with --branch <REF> --depth 1 or by cloning then checking out a specific commit
SHA (git clone ... --depth 1 && cd boost-ci-cloned && git checkout <COMMIT_SHA>)
before copying the ci directory; apply this same change to the other clone sites
mentioned (lines ~48-50, 117-120, 153-156) so the pipeline always uses a fixed
ref.
- Around line 142-145: Replace the hardcoded --no-tests=error flag in the ctest
invocations with the CMAKE_NO_TESTS variable so the earlier override is
respected: modify the two commands matching "ctest --output-on-failure
--no-tests=error -R boost_!SELF! -C Debug" and the Release variant to use
%CMAKE_NO_TESTS% (or the project variable name CMAKE_NO_TESTS) instead of
--no-tests=error; keep the rest of each ctest invocation identical so behavior
and regex (-R boost_!SELF!) and -C remain unchanged.
- Around line 13-181: The if/else-if chain checking %DRONE_JOB_BUILDTYPE% (the
block starting with if "%DRONE_JOB_BUILDTYPE%" == "boost" (...) and subsequent
else if branches) lacks a fallback, so unsupported job types silently do
nothing; add a final else branch after the last else if that echoes a clear
error mentioning the unknown %DRONE_JOB_BUILDTYPE% and returns a non-zero exit
(use exit /b 1 or exit 1) to fail the build and surface the problem.
- Around line 7-11: Several SET assignments use unquoted environment-derived
values (notably SET TRAVIS_BRANCH=!DRONE_BRANCH!) which can allow cmd
metacharacters to break parsing or enable injection; change those to use the
safe quoted-assignment pattern SET "VAR=VALUE" (e.g., change SET
TRAVIS_BRANCH=!DRONE_BRANCH! to SET "TRAVIS_BRANCH=!DRONE_BRANCH!" and apply the
same change to other unquoted SETs that reference env vars such as the
assignments around the blocks identified (lines with SET that reference
GITHUB_REF, DRONE_BRANCH or similar — e.g., the ones you flagged at lines 28,
29, 53, 54, 122, 123, 158, 159) so all SET calls use SET "NAME=VALUE)" style to
prevent command injection and parsing errors.
In @.drone/drone.sh:
- Around line 25-37: The script currently does an unpinned git clone ("git clone
... boost-ci-cloned") and then sources scripts (". ./ci/common_install.sh") from
that clone, which is unsafe; change the clone step to fetch and checkout a
specific trusted ref (tag or commit) into boost-ci-cloned (or verify and
checkout a pinned ref after cloning), validate the checkout (e.g., check commit
hash or GPG signature) and only then copy/replace ci/ and source ".
./ci/common_install.sh"; ensure the code paths referencing boost-ci-cloned, git
clone, and the later ". ./ci/common_install.sh" call are updated so CI uses the
verified, pinned ref instead of moving HEAD.
- Around line 43-195: The DRONE_JOB_BUILDTYPE dispatch lacks a final fallback so
unknown/typo values can silently succeed; add a final else branch after the
existing if/elif chain that echoes an error including the invalid
"$DRONE_JOB_BUILDTYPE" value to stderr (or via >&2), prints a helpful message
about supported build types, and exits with a non‑zero status (e.g., exit 1) so
the pipeline fails fast; place this fallback after the last fi that closes the
chain and reference the DRONE_JOB_BUILDTYPE variable and the dispatch logic to
locate where to insert it.
---
Nitpick comments:
In @.drone/drone.sh:
- Line 83: The conditional using single-bracket test on the COVERITY gate is
using -a/-o which is error-prone; replace the if that tests
COVERITY_SCAN_NOTIFICATION_EMAIL, TRAVIS_BRANCH, and DRONE_BUILD_EVENT with a
bash-style conditional using [[ ... ]] and combine checks with explicit && and
|| (e.g., test -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" && (TRAVIS_BRANCH ==
"develop" || TRAVIS_BRANCH == "master") && (DRONE_BUILD_EVENT == "push" ||
DRONE_BUILD_EVENT == "cron")) so the logical grouping is explicit and reliable;
update the if line in .drone/drone.sh accordingly (refer to the existing if
statement that currently uses -n, -a and -o).
| IF "!DRONE_BRANCH!" == "" ( | ||
| for /F %%i in ("!GITHUB_REF!") do @set TRAVIS_BRANCH=%%~nxi | ||
| ) else ( | ||
| SET TRAVIS_BRANCH=!DRONE_BRANCH! | ||
| ) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
# First, let's locate and read the .drone/drone.bat file
find . -name "drone.bat" -type fRepository: cppalliance/corosio
Length of output: 81
🏁 Script executed:
# Read the .drone/drone.bat file to see the actual content
cat -n .drone/drone.batRepository: cppalliance/corosio
Length of output: 6364
🏁 Script executed:
# Search for all SET assignments in the file to check for other similar patterns
rg "^\s*SET\s+" .drone/drone.bat -A 1Repository: cppalliance/corosio
Length of output: 880
Quote environment-derived SET assignments to prevent command injection and parsing errors.
Line 10 uses unquoted SET TRAVIS_BRANCH=!DRONE_BRANCH!. In batch scripts with delayed expansion enabled, unquoted values containing cmd metacharacters (&, |, )) can alter command flow or enable command injection.
Apply the pattern SET "VARIABLE=!VALUE!" to line 10 and other unquoted SET assignments that reference environment or system variables (e.g., lines 28, 29, 53, 54, 122, 123, 158, 159).
Example fix for line 10
- SET TRAVIS_BRANCH=!DRONE_BRANCH!
+ SET "TRAVIS_BRANCH=!DRONE_BRANCH!"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| IF "!DRONE_BRANCH!" == "" ( | |
| for /F %%i in ("!GITHUB_REF!") do @set TRAVIS_BRANCH=%%~nxi | |
| ) else ( | |
| SET TRAVIS_BRANCH=!DRONE_BRANCH! | |
| ) | |
| IF "!DRONE_BRANCH!" == "" ( | |
| for /F %%i in ("!GITHUB_REF!") do `@set` TRAVIS_BRANCH=%%~nxi | |
| ) else ( | |
| SET "TRAVIS_BRANCH=!DRONE_BRANCH!" | |
| ) |
🧰 Tools
🪛 Blinter (1.0.112)
[error] 10-10: Unsafe SET command usage. Explanation: SET commands without proper validation or quoting can cause security issues. Recommendation: Always quote SET values and validate input: SET "var=safe value". Context: SET command value should be quoted for safety
(SEC002)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.drone/drone.bat around lines 7 - 11, Several SET assignments use unquoted
environment-derived values (notably SET TRAVIS_BRANCH=!DRONE_BRANCH!) which can
allow cmd metacharacters to break parsing or enable injection; change those to
use the safe quoted-assignment pattern SET "VAR=VALUE" (e.g., change SET
TRAVIS_BRANCH=!DRONE_BRANCH! to SET "TRAVIS_BRANCH=!DRONE_BRANCH!" and apply the
same change to other unquoted SETs that reference env vars such as the
assignments around the blocks identified (lines with SET that reference
GITHUB_REF, DRONE_BRANCH or similar — e.g., the ones you flagged at lines 28,
29, 53, 54, 122, 123, 158, 159) so all SET calls use SET "NAME=VALUE)" style to
prevent command injection and parsing errors.
| if "%DRONE_JOB_BUILDTYPE%" == "boost" ( | ||
|
|
||
| echo "Running boost job" | ||
| echo '==================================> INSTALL' | ||
| REM there seems to be some problem with b2 bootstrap on Windows | ||
| REM when CXX env variable is set | ||
| SET "CXX=" | ||
|
|
||
| git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1 | ||
| cp -prf boost-ci-cloned/ci . | ||
| rm -rf boost-ci-cloned | ||
| REM source ci/travis/install.sh | ||
| REM The contents of install.sh below: | ||
|
|
||
| for /F %%i in ("%DRONE_REPO%") do @set SELF=%%~nxi | ||
| SET BOOST_CI_TARGET_BRANCH=!TRAVIS_BRANCH! | ||
| SET BOOST_CI_SRC_FOLDER=%cd% | ||
| if "%BOOST_BRANCH%" == "" ( | ||
| SET BOOST_BRANCH=develop | ||
| if "%BOOST_CI_TARGET_BRANCH%" == "master" set BOOST_BRANCH=master | ||
| ) | ||
|
|
||
| call ci\common_install.bat | ||
|
|
||
| echo '==================================> COMPILE' | ||
|
|
||
| set B2_TARGETS=libs/!SELF!/test | ||
| call !BOOST_ROOT!\libs\!SELF!\ci\build.bat | ||
|
|
||
| ) else if "%DRONE_JOB_BUILDTYPE%" == "cmake-superproject" ( | ||
|
|
||
| echo "Running cmake superproject job" | ||
| echo '==================================> INSTALL' | ||
| SET "CXX=" | ||
|
|
||
| git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1 | ||
| cp -prf boost-ci-cloned/ci . | ||
| rm -rf boost-ci-cloned | ||
|
|
||
| for /F %%i in ("%DRONE_REPO%") do @set SELF=%%~nxi | ||
| SET BOOST_CI_TARGET_BRANCH=!TRAVIS_BRANCH! | ||
| SET BOOST_CI_SRC_FOLDER=%cd% | ||
|
|
||
| call ci\common_install.bat | ||
|
|
||
| echo '==================================> COMPILE' | ||
|
|
||
| if "!CMAKE_NO_TESTS!" == "" ( | ||
| SET CMAKE_NO_TESTS=error | ||
| ) | ||
| if "!CMAKE_NO_TESTS!" == "error" ( | ||
| SET CMAKE_BUILD_TESTING=-DBUILD_TESTING=ON | ||
| ) | ||
|
|
||
| cd ../../ | ||
|
|
||
| mkdir __build_static && cd __build_static | ||
| cmake -DBoost_VERBOSE=1 !CMAKE_BUILD_TESTING! -DCMAKE_INSTALL_PREFIX=iprefix ^ | ||
| -DBOOST_INCLUDE_LIBRARIES=!SELF! !CMAKE_OPTIONS! .. | ||
|
|
||
| cmake --build . --target install --config Debug | ||
| if NOT "!CMAKE_BUILD_TESTING!" == "" ( | ||
| cmake --build . --target tests --config Debug | ||
| ) | ||
| ctest --output-on-failure --no-tests=!CMAKE_NO_TESTS! -C Debug | ||
|
|
||
| cmake --build . --target install --config Release | ||
| if NOT "!CMAKE_BUILD_TESTING!" == "" ( | ||
| cmake --build . --target tests --config Release | ||
| ) | ||
| ctest --output-on-failure --no-tests=!CMAKE_NO_TESTS! -C Release | ||
| cd .. | ||
|
|
||
| if "!CMAKE_SHARED_LIBS!" == "" ( | ||
| SET CMAKE_SHARED_LIBS=1 | ||
| ) | ||
| if "!CMAKE_SHARED_LIBS!" == "1" ( | ||
|
|
||
| mkdir __build_shared && cd __build_shared | ||
| cmake -DBoost_VERBOSE=1 !CMAKE_BUILD_TESTING! -DCMAKE_INSTALL_PREFIX=iprefix ^ | ||
| -DBOOST_INCLUDE_LIBRARIES=!SELF! -DBUILD_SHARED_LIBS=ON !CMAKE_OPTIONS! .. | ||
|
|
||
| cmake --build . --config Debug | ||
| cmake --build . --target install --config Debug | ||
| if NOT "!CMAKE_BUILD_TESTING!" == "" ( | ||
| cmake --build . --target tests --config Debug | ||
| ) | ||
| ctest --output-on-failure --no-tests=!CMAKE_NO_TESTS! -C Debug | ||
|
|
||
| cmake --build . --config Release | ||
| cmake --build . --target install --config Release | ||
| if NOT "!CMAKE_BUILD_TESTING!" == "" ( | ||
| cmake --build . --target tests --config Release | ||
| ) | ||
| ctest --output-on-failure --no-tests=!CMAKE_NO_TESTS! -C Release | ||
|
|
||
| ) | ||
|
|
||
| ) else if "%DRONE_JOB_BUILDTYPE%" == "cmake-mainproject" ( | ||
|
|
||
| echo "Running cmake main project job" | ||
| echo '==================================> INSTALL' | ||
| SET "CXX=" | ||
|
|
||
| git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1 | ||
| cp -prf boost-ci-cloned/ci . | ||
| rm -rf boost-ci-cloned | ||
|
|
||
| for /F %%i in ("%DRONE_REPO%") do @set SELF=%%~nxi | ||
| SET BOOST_CI_TARGET_BRANCH=!TRAVIS_BRANCH! | ||
| SET BOOST_CI_SRC_FOLDER=%cd% | ||
|
|
||
| call ci\common_install.bat | ||
|
|
||
| echo '==================================> COMPILE' | ||
|
|
||
| if "!CMAKE_NO_TESTS!" == "" ( | ||
| SET CMAKE_NO_TESTS=error | ||
| ) | ||
| if "!CMAKE_NO_TESTS!" == "error" ( | ||
| SET CMAKE_BUILD_TESTING=-DBUILD_TESTING=ON | ||
| ) | ||
|
|
||
| cd ../../ | ||
|
|
||
| mkdir __build_static && cd __build_static | ||
| cmake -DBoost_VERBOSE=1 !CMAKE_BUILD_TESTING! -DCMAKE_INSTALL_PREFIX=iprefix ^ | ||
| !CMAKE_OPTIONS! ../libs/!SELF! | ||
| cmake --build . --target install --config Debug | ||
| ctest --output-on-failure --no-tests=error -R boost_!SELF! -C Debug | ||
|
|
||
| cmake --build . --target install --config Release | ||
| ctest --output-on-failure --no-tests=error -R boost_!SELF! -C Release | ||
|
|
||
| ) else if "%DRONE_JOB_BUILDTYPE%" == "cmake-subdirectory" ( | ||
|
|
||
| echo "Running cmake subdirectory job" | ||
| echo '==================================> INSTALL' | ||
| SET "CXX=" | ||
|
|
||
| git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1 | ||
| cp -prf boost-ci-cloned/ci . | ||
| rm -rf boost-ci-cloned | ||
|
|
||
| for /F %%i in ("%DRONE_REPO%") do @set SELF=%%~nxi | ||
| SET BOOST_CI_TARGET_BRANCH=!TRAVIS_BRANCH! | ||
| SET BOOST_CI_SRC_FOLDER=%cd% | ||
|
|
||
| call ci\common_install.bat | ||
|
|
||
| echo '==================================> COMPILE' | ||
|
|
||
| if "!CMAKE_NO_TESTS!" == "" ( | ||
| SET CMAKE_NO_TESTS=error | ||
| ) | ||
| if "!CMAKE_NO_TESTS!" == "error" ( | ||
| SET CMAKE_BUILD_TESTING=-DBUILD_TESTING=ON | ||
| ) | ||
|
|
||
| cd ../../ | ||
|
|
||
| mkdir __build_static && cd __build_static | ||
| cmake !CMAKE_BUILD_TESTING! !CMAKE_OPTIONS! ../libs/!SELF!/test/cmake_test | ||
| cmake --build . --config Debug | ||
| cmake --build . --target check --config Debug | ||
| cmake --build . --config Release | ||
| cmake --build . --target check --config Release | ||
|
|
||
| ) |
There was a problem hiding this comment.
Add a fallback branch for unsupported job types.
The current if / else if chain does nothing for unexpected values and can exit successfully without executing checks.
Proposed fix
-) else if "%DRONE_JOB_BUILDTYPE%" == "cmake-subdirectory" (
+) else if "%DRONE_JOB_BUILDTYPE%" == "cmake-subdirectory" (
@@
-)
+) else (
+echo Unsupported DRONE_JOB_BUILDTYPE: %DRONE_JOB_BUILDTYPE%
+exit /b 1
+)🧰 Tools
🪛 Blinter (1.0.112)
[error] 67-67: Unvalidated path traversal. Explanation: Path operations may allow directory traversal attacks with .. sequences. Recommendation: Validate paths and remove .. sequences before file operations. Context: Path contains .. which may allow directory traversal
(SEC011)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.drone/drone.bat around lines 13 - 181, The if/else-if chain checking
%DRONE_JOB_BUILDTYPE% (the block starting with if "%DRONE_JOB_BUILDTYPE%" ==
"boost" (...) and subsequent else if branches) lacks a fallback, so unsupported
job types silently do nothing; add a final else branch after the last else if
that echoes a clear error mentioning the unknown %DRONE_JOB_BUILDTYPE% and
returns a non-zero exit (use exit /b 1 or exit 1) to fail the build and surface
the problem.
| git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1 | ||
| cp -prf boost-ci-cloned/ci . | ||
| rm -rf boost-ci-cloned | ||
| REM source ci/travis/install.sh |
There was a problem hiding this comment.
Pin boost-ci to a specific ref in all clone sites.
Each clone currently pulls moving HEAD, then executes copied CI scripts. This can unpredictably change pipeline behavior and weakens supply-chain posture.
Proposed hardening pattern (batch)
+if "%BOOST_CI_REF%"=="" (
+ echo BOOST_CI_REF must be set to a pinned tag/commit
+ exit /b 1
+)
git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1
+git -C boost-ci-cloned fetch --depth 1 origin %BOOST_CI_REF%
+git -C boost-ci-cloned checkout --detach %BOOST_CI_REF%
cp -prf boost-ci-cloned/ci .
rm -rf boost-ci-clonedAlso applies to: 48-50, 117-120, 153-156
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.drone/drone.bat around lines 21 - 24, The git clones of boost-ci currently
fetch moving HEAD; update each clone invocation (the git clone commands that
create boost-ci-cloned in this file — e.g., the occurrences at the shown block
and the other sites noted) to pin to a specific immutable ref by either cloning
a named tag/branch with --branch <REF> --depth 1 or by cloning then checking out
a specific commit SHA (git clone ... --depth 1 && cd boost-ci-cloned && git
checkout <COMMIT_SHA>) before copying the ci directory; apply this same change
to the other clone sites mentioned (lines ~48-50, 117-120, 153-156) so the
pipeline always uses a fixed ref.
| ctest --output-on-failure --no-tests=error -R boost_!SELF! -C Debug | ||
|
|
||
| cmake --build . --target install --config Release | ||
| ctest --output-on-failure --no-tests=error -R boost_!SELF! -C Release |
There was a problem hiding this comment.
Respect CMAKE_NO_TESTS in cmake-mainproject ctest calls.
Lines [142] and [145] hardcode --no-tests=error, bypassing the override set at Lines [129]-[134].
Proposed fix
-ctest --output-on-failure --no-tests=error -R boost_!SELF! -C Debug
+ctest --output-on-failure --no-tests=!CMAKE_NO_TESTS! -R boost_!SELF! -C Debug
@@
-ctest --output-on-failure --no-tests=error -R boost_!SELF! -C Release
+ctest --output-on-failure --no-tests=!CMAKE_NO_TESTS! -R boost_!SELF! -C Release📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| ctest --output-on-failure --no-tests=error -R boost_!SELF! -C Debug | |
| cmake --build . --target install --config Release | |
| ctest --output-on-failure --no-tests=error -R boost_!SELF! -C Release | |
| ctest --output-on-failure --no-tests=!CMAKE_NO_TESTS! -R boost_!SELF! -C Debug | |
| cmake --build . --target install --config Release | |
| ctest --output-on-failure --no-tests=!CMAKE_NO_TESTS! -R boost_!SELF! -C Release |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.drone/drone.bat around lines 142 - 145, Replace the hardcoded
--no-tests=error flag in the ctest invocations with the CMAKE_NO_TESTS variable
so the earlier override is respected: modify the two commands matching "ctest
--output-on-failure --no-tests=error -R boost_!SELF! -C Debug" and the Release
variant to use %CMAKE_NO_TESTS% (or the project variable name CMAKE_NO_TESTS)
instead of --no-tests=error; keep the rest of each ctest invocation identical so
behavior and regex (-R boost_!SELF!) and -C remain unchanged.
| git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1 | ||
| [ "$SELF" == "boost-ci" ] || cp -prf boost-ci-cloned/ci . | ||
| rm -rf boost-ci-cloned | ||
|
|
||
| if [ "$TRAVIS_OS_NAME" == "osx" ]; then | ||
| unset -f cd | ||
| fi | ||
|
|
||
| export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH" | ||
| export BOOST_CI_SRC_FOLDER=$(pwd) | ||
|
|
||
| . ./ci/common_install.sh | ||
| } |
There was a problem hiding this comment.
Pin boost-ci to a trusted ref before sourcing scripts.
Line [25] clones moving HEAD, and Line [36] executes code from that clone. This can silently change CI behavior and creates a supply-chain risk.
Proposed hardening diff
common_install () {
@@
- git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1
+ : "${BOOST_CI_REF:?Set BOOST_CI_REF to a pinned boost-ci tag or commit}"
+ git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1
+ git -C boost-ci-cloned fetch --depth 1 origin "$BOOST_CI_REF"
+ git -C boost-ci-cloned checkout --detach "$BOOST_CI_REF"
[ "$SELF" == "boost-ci" ] || cp -prf boost-ci-cloned/ci .📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1 | |
| [ "$SELF" == "boost-ci" ] || cp -prf boost-ci-cloned/ci . | |
| rm -rf boost-ci-cloned | |
| if [ "$TRAVIS_OS_NAME" == "osx" ]; then | |
| unset -f cd | |
| fi | |
| export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH" | |
| export BOOST_CI_SRC_FOLDER=$(pwd) | |
| . ./ci/common_install.sh | |
| } | |
| : "${BOOST_CI_REF:?Set BOOST_CI_REF to a pinned boost-ci tag or commit}" | |
| git clone https://github.com/boostorg/boost-ci.git boost-ci-cloned --depth 1 | |
| git -C boost-ci-cloned fetch --depth 1 origin "$BOOST_CI_REF" | |
| git -C boost-ci-cloned checkout --detach "$BOOST_CI_REF" | |
| [ "$SELF" == "boost-ci" ] || cp -prf boost-ci-cloned/ci . | |
| rm -rf boost-ci-cloned | |
| if [ "$TRAVIS_OS_NAME" == "osx" ]; then | |
| unset -f cd | |
| fi | |
| export BOOST_CI_TARGET_BRANCH="$TRAVIS_BRANCH" | |
| export BOOST_CI_SRC_FOLDER=$(pwd) | |
| . ./ci/common_install.sh | |
| } |
🧰 Tools
🪛 Shellcheck (0.11.0)
[warning] 34-34: Declare and assign separately to avoid masking return values.
(SC2155)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.drone/drone.sh around lines 25 - 37, The script currently does an unpinned
git clone ("git clone ... boost-ci-cloned") and then sources scripts (".
./ci/common_install.sh") from that clone, which is unsafe; change the clone step
to fetch and checkout a specific trusted ref (tag or commit) into
boost-ci-cloned (or verify and checkout a pinned ref after cloning), validate
the checkout (e.g., check commit hash or GPG signature) and only then
copy/replace ci/ and source ". ./ci/common_install.sh"; ensure the code paths
referencing boost-ci-cloned, git clone, and the later ". ./ci/common_install.sh"
call are updated so CI uses the verified, pinned ref instead of moving HEAD.
| if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then | ||
|
|
||
| echo '==================================> INSTALL' | ||
|
|
||
| common_install | ||
|
|
||
| echo '==================================> SCRIPT' | ||
|
|
||
| . $BOOST_ROOT/libs/$SELF/ci/build.sh | ||
|
|
||
| elif [ "$DRONE_JOB_BUILDTYPE" == "codecov" ]; then | ||
|
|
||
| echo '==================================> INSTALL' | ||
|
|
||
| common_install | ||
|
|
||
| echo '==================================> SCRIPT' | ||
|
|
||
| cd $BOOST_ROOT/libs/$SELF | ||
| ci/travis/codecov.sh | ||
|
|
||
| elif [ "$DRONE_JOB_BUILDTYPE" == "valgrind" ]; then | ||
|
|
||
| echo '==================================> INSTALL' | ||
|
|
||
| common_install | ||
|
|
||
| echo '==================================> SCRIPT' | ||
|
|
||
| cd $BOOST_ROOT/libs/$SELF | ||
| ci/travis/valgrind.sh | ||
|
|
||
| elif [ "$DRONE_JOB_BUILDTYPE" == "coverity" ]; then | ||
|
|
||
| echo '==================================> INSTALL' | ||
|
|
||
| common_install | ||
|
|
||
| echo '==================================> SCRIPT' | ||
|
|
||
| if [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$TRAVIS_BRANCH" = "develop" -o "$TRAVIS_BRANCH" = "master" \) -a \( "$DRONE_BUILD_EVENT" = "push" -o "$DRONE_BUILD_EVENT" = "cron" \) ] ; then | ||
| cd $BOOST_ROOT/libs/$SELF | ||
| ci/travis/coverity.sh | ||
| fi | ||
|
|
||
| elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-superproject" ]; then | ||
|
|
||
| echo '==================================> INSTALL' | ||
|
|
||
| common_install | ||
|
|
||
| echo '==================================> COMPILE' | ||
|
|
||
| export CXXFLAGS="-Wall -Wextra -Werror" | ||
| export CMAKE_SHARED_LIBS=${CMAKE_SHARED_LIBS:-1} | ||
| export CMAKE_NO_TESTS=${CMAKE_NO_TESTS:-error} | ||
| if [ $CMAKE_NO_TESTS = "error" ]; then | ||
| CMAKE_BUILD_TESTING="-DBUILD_TESTING=ON" | ||
| fi | ||
|
|
||
| mkdir __build_static | ||
| cd __build_static | ||
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | ||
| -DBOOST_INCLUDE_LIBRARIES=$SELF ${CMAKE_OPTIONS} .. | ||
| if [ -n "${CMAKE_BUILD_TESTING}" ]; then | ||
| cmake --build . --target tests | ||
| fi | ||
| cmake --build . --target install | ||
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | ||
| cd .. | ||
|
|
||
| if [ "$CMAKE_SHARED_LIBS" = 1 ]; then | ||
|
|
||
| mkdir __build_shared | ||
| cd __build_shared | ||
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | ||
| -DBOOST_INCLUDE_LIBRARIES=$SELF -DBUILD_SHARED_LIBS=ON ${CMAKE_OPTIONS} .. | ||
| if [ -n "${CMAKE_BUILD_TESTING}" ]; then | ||
| cmake --build . --target tests | ||
| fi | ||
| cmake --build . --target install | ||
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | ||
|
|
||
| fi | ||
|
|
||
| elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-mainproject" ]; then | ||
|
|
||
| echo '==================================> INSTALL' | ||
|
|
||
| common_install | ||
|
|
||
| echo '==================================> COMPILE' | ||
|
|
||
| export CXXFLAGS="-Wall -Wextra -Werror" | ||
| export CMAKE_SHARED_LIBS=${CMAKE_SHARED_LIBS:-1} | ||
| export CMAKE_NO_TESTS=${CMAKE_NO_TESTS:-error} | ||
| if [ $CMAKE_NO_TESTS = "error" ]; then | ||
| CMAKE_BUILD_TESTING="-DBUILD_TESTING=ON" | ||
| fi | ||
|
|
||
| mkdir __build_static | ||
| cd __build_static | ||
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | ||
| ${CMAKE_OPTIONS} ../libs/$SELF | ||
| cmake --build . --target install | ||
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | ||
| cd .. | ||
|
|
||
| if [ "$CMAKE_SHARED_LIBS" = 1 ]; then | ||
|
|
||
| mkdir __build_shared | ||
| cd __build_shared | ||
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | ||
| -DBUILD_SHARED_LIBS=ON ${CMAKE_OPTIONS} ../libs/$SELF | ||
| cmake --build . --target install | ||
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | ||
|
|
||
| fi | ||
|
|
||
| elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-subdirectory" ]; then | ||
|
|
||
| echo '==================================> INSTALL' | ||
|
|
||
| common_install | ||
|
|
||
| echo '==================================> COMPILE' | ||
|
|
||
| export CXXFLAGS="-Wall -Wextra -Werror" | ||
| export CMAKE_SHARED_LIBS=${CMAKE_SHARED_LIBS:-1} | ||
| export CMAKE_NO_TESTS=${CMAKE_NO_TESTS:-error} | ||
| if [ $CMAKE_NO_TESTS = "error" ]; then | ||
| CMAKE_BUILD_TESTING="-DBUILD_TESTING=ON" | ||
| fi | ||
|
|
||
| mkdir __build_static | ||
| cd __build_static | ||
| cmake ${CMAKE_BUILD_TESTING} ${CMAKE_OPTIONS} ../libs/$SELF/test/cmake_test | ||
| cmake --build . | ||
| cmake --build . --target check | ||
| cd .. | ||
|
|
||
| if [ "$CMAKE_SHARED_LIBS" = 1 ]; then | ||
|
|
||
| mkdir __build_shared | ||
| cd __build_shared | ||
| cmake ${CMAKE_BUILD_TESTING} -DBUILD_SHARED_LIBS=ON ${CMAKE_OPTIONS} \ | ||
| ../libs/$SELF/test/cmake_test | ||
| cmake --build . | ||
| cmake --build . --target check | ||
|
|
||
| fi | ||
|
|
||
| fi |
There was a problem hiding this comment.
Fail fast on unsupported DRONE_JOB_BUILDTYPE.
The dispatch block has no final fallback. A typo or unexpected value can exit successfully without running any build/test step.
Proposed fix
elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-subdirectory" ]; then
@@
fi
+
+else
+ echo "Unsupported DRONE_JOB_BUILDTYPE: $DRONE_JOB_BUILDTYPE" >&2
+ exit 1
+fi📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> SCRIPT' | |
| . $BOOST_ROOT/libs/$SELF/ci/build.sh | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "codecov" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> SCRIPT' | |
| cd $BOOST_ROOT/libs/$SELF | |
| ci/travis/codecov.sh | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "valgrind" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> SCRIPT' | |
| cd $BOOST_ROOT/libs/$SELF | |
| ci/travis/valgrind.sh | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "coverity" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> SCRIPT' | |
| if [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$TRAVIS_BRANCH" = "develop" -o "$TRAVIS_BRANCH" = "master" \) -a \( "$DRONE_BUILD_EVENT" = "push" -o "$DRONE_BUILD_EVENT" = "cron" \) ] ; then | |
| cd $BOOST_ROOT/libs/$SELF | |
| ci/travis/coverity.sh | |
| fi | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-superproject" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> COMPILE' | |
| export CXXFLAGS="-Wall -Wextra -Werror" | |
| export CMAKE_SHARED_LIBS=${CMAKE_SHARED_LIBS:-1} | |
| export CMAKE_NO_TESTS=${CMAKE_NO_TESTS:-error} | |
| if [ $CMAKE_NO_TESTS = "error" ]; then | |
| CMAKE_BUILD_TESTING="-DBUILD_TESTING=ON" | |
| fi | |
| mkdir __build_static | |
| cd __build_static | |
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | |
| -DBOOST_INCLUDE_LIBRARIES=$SELF ${CMAKE_OPTIONS} .. | |
| if [ -n "${CMAKE_BUILD_TESTING}" ]; then | |
| cmake --build . --target tests | |
| fi | |
| cmake --build . --target install | |
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | |
| cd .. | |
| if [ "$CMAKE_SHARED_LIBS" = 1 ]; then | |
| mkdir __build_shared | |
| cd __build_shared | |
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | |
| -DBOOST_INCLUDE_LIBRARIES=$SELF -DBUILD_SHARED_LIBS=ON ${CMAKE_OPTIONS} .. | |
| if [ -n "${CMAKE_BUILD_TESTING}" ]; then | |
| cmake --build . --target tests | |
| fi | |
| cmake --build . --target install | |
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | |
| fi | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-mainproject" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> COMPILE' | |
| export CXXFLAGS="-Wall -Wextra -Werror" | |
| export CMAKE_SHARED_LIBS=${CMAKE_SHARED_LIBS:-1} | |
| export CMAKE_NO_TESTS=${CMAKE_NO_TESTS:-error} | |
| if [ $CMAKE_NO_TESTS = "error" ]; then | |
| CMAKE_BUILD_TESTING="-DBUILD_TESTING=ON" | |
| fi | |
| mkdir __build_static | |
| cd __build_static | |
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | |
| ${CMAKE_OPTIONS} ../libs/$SELF | |
| cmake --build . --target install | |
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | |
| cd .. | |
| if [ "$CMAKE_SHARED_LIBS" = 1 ]; then | |
| mkdir __build_shared | |
| cd __build_shared | |
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | |
| -DBUILD_SHARED_LIBS=ON ${CMAKE_OPTIONS} ../libs/$SELF | |
| cmake --build . --target install | |
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | |
| fi | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-subdirectory" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> COMPILE' | |
| export CXXFLAGS="-Wall -Wextra -Werror" | |
| export CMAKE_SHARED_LIBS=${CMAKE_SHARED_LIBS:-1} | |
| export CMAKE_NO_TESTS=${CMAKE_NO_TESTS:-error} | |
| if [ $CMAKE_NO_TESTS = "error" ]; then | |
| CMAKE_BUILD_TESTING="-DBUILD_TESTING=ON" | |
| fi | |
| mkdir __build_static | |
| cd __build_static | |
| cmake ${CMAKE_BUILD_TESTING} ${CMAKE_OPTIONS} ../libs/$SELF/test/cmake_test | |
| cmake --build . | |
| cmake --build . --target check | |
| cd .. | |
| if [ "$CMAKE_SHARED_LIBS" = 1 ]; then | |
| mkdir __build_shared | |
| cd __build_shared | |
| cmake ${CMAKE_BUILD_TESTING} -DBUILD_SHARED_LIBS=ON ${CMAKE_OPTIONS} \ | |
| ../libs/$SELF/test/cmake_test | |
| cmake --build . | |
| cmake --build . --target check | |
| fi | |
| fi | |
| if [ "$DRONE_JOB_BUILDTYPE" == "boost" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> SCRIPT' | |
| . $BOOST_ROOT/libs/$SELF/ci/build.sh | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "codecov" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> SCRIPT' | |
| cd $BOOST_ROOT/libs/$SELF | |
| ci/travis/codecov.sh | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "valgrind" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> SCRIPT' | |
| cd $BOOST_ROOT/libs/$SELF | |
| ci/travis/valgrind.sh | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "coverity" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> SCRIPT' | |
| if [ -n "${COVERITY_SCAN_NOTIFICATION_EMAIL}" -a \( "$TRAVIS_BRANCH" = "develop" -o "$TRAVIS_BRANCH" = "master" \) -a \( "$DRONE_BUILD_EVENT" = "push" -o "$DRONE_BUILD_EVENT" = "cron" \) ] ; then | |
| cd $BOOST_ROOT/libs/$SELF | |
| ci/travis/coverity.sh | |
| fi | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-superproject" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> COMPILE' | |
| export CXXFLAGS="-Wall -Wextra -Werror" | |
| export CMAKE_SHARED_LIBS=${CMAKE_SHARED_LIBS:-1} | |
| export CMAKE_NO_TESTS=${CMAKE_NO_TESTS:-error} | |
| if [ $CMAKE_NO_TESTS = "error" ]; then | |
| CMAKE_BUILD_TESTING="-DBUILD_TESTING=ON" | |
| fi | |
| mkdir __build_static | |
| cd __build_static | |
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | |
| -DBOOST_INCLUDE_LIBRARIES=$SELF ${CMAKE_OPTIONS} .. | |
| if [ -n "${CMAKE_BUILD_TESTING}" ]; then | |
| cmake --build . --target tests | |
| fi | |
| cmake --build . --target install | |
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | |
| cd .. | |
| if [ "$CMAKE_SHARED_LIBS" = 1 ]; then | |
| mkdir __build_shared | |
| cd __build_shared | |
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | |
| -DBOOST_INCLUDE_LIBRARIES=$SELF -DBUILD_SHARED_LIBS=ON ${CMAKE_OPTIONS} .. | |
| if [ -n "${CMAKE_BUILD_TESTING}" ]; then | |
| cmake --build . --target tests | |
| fi | |
| cmake --build . --target install | |
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | |
| fi | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-mainproject" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> COMPILE' | |
| export CXXFLAGS="-Wall -Wextra -Werror" | |
| export CMAKE_SHARED_LIBS=${CMAKE_SHARED_LIBS:-1} | |
| export CMAKE_NO_TESTS=${CMAKE_NO_TESTS:-error} | |
| if [ $CMAKE_NO_TESTS = "error" ]; then | |
| CMAKE_BUILD_TESTING="-DBUILD_TESTING=ON" | |
| fi | |
| mkdir __build_static | |
| cd __build_static | |
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | |
| ${CMAKE_OPTIONS} ../libs/$SELF | |
| cmake --build . --target install | |
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | |
| cd .. | |
| if [ "$CMAKE_SHARED_LIBS" = 1 ]; then | |
| mkdir __build_shared | |
| cd __build_shared | |
| cmake -DBoost_VERBOSE=1 ${CMAKE_BUILD_TESTING} -DCMAKE_INSTALL_PREFIX=iprefix \ | |
| -DBUILD_SHARED_LIBS=ON ${CMAKE_OPTIONS} ../libs/$SELF | |
| cmake --build . --target install | |
| ctest --output-on-failure --no-tests=$CMAKE_NO_TESTS | |
| fi | |
| elif [ "$DRONE_JOB_BUILDTYPE" == "cmake-subdirectory" ]; then | |
| echo '==================================> INSTALL' | |
| common_install | |
| echo '==================================> COMPILE' | |
| export CXXFLAGS="-Wall -Wextra -Werror" | |
| export CMAKE_SHARED_LIBS=${CMAKE_SHARED_LIBS:-1} | |
| export CMAKE_NO_TESTS=${CMAKE_NO_TESTS:-error} | |
| if [ $CMAKE_NO_TESTS = "error" ]; then | |
| CMAKE_BUILD_TESTING="-DBUILD_TESTING=ON" | |
| fi | |
| mkdir __build_static | |
| cd __build_static | |
| cmake ${CMAKE_BUILD_TESTING} ${CMAKE_OPTIONS} ../libs/$SELF/test/cmake_test | |
| cmake --build . | |
| cmake --build . --target check | |
| cd .. | |
| if [ "$CMAKE_SHARED_LIBS" = 1 ]; then | |
| mkdir __build_shared | |
| cd __build_shared | |
| cmake ${CMAKE_BUILD_TESTING} -DBUILD_SHARED_LIBS=ON ${CMAKE_OPTIONS} \ | |
| ../libs/$SELF/test/cmake_test | |
| cmake --build . | |
| cmake --build . --target check | |
| fi | |
| else | |
| echo "Unsupported DRONE_JOB_BUILDTYPE: $DRONE_JOB_BUILDTYPE" >&2 | |
| exit 1 | |
| fi |
🧰 Tools
🪛 Shellcheck (0.11.0)
[warning] 51-51: ShellCheck can't follow non-constant source. Use a directive to specify location.
(SC1090)
[warning] 83-83: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
(SC2166)
[warning] 83-83: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
(SC2166)
[warning] 83-83: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined.
(SC2166)
[warning] 83-83: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
(SC2166)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.drone/drone.sh around lines 43 - 195, The DRONE_JOB_BUILDTYPE dispatch
lacks a final fallback so unknown/typo values can silently succeed; add a final
else branch after the existing if/elif chain that echoes an error including the
invalid "$DRONE_JOB_BUILDTYPE" value to stderr (or via >&2), prints a helpful
message about supported build types, and exits with a non‑zero status (e.g.,
exit 1) so the pipeline fails fast; place this fallback after the last fi that
closes the chain and reference the DRONE_JOB_BUILDTYPE variable and the dispatch
logic to locate where to insert it.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #185 +/- ##
===========================================
+ Coverage 76.17% 76.30% +0.12%
===========================================
Files 98 98
Lines 10532 10532
Branches 2388 2388
===========================================
+ Hits 8023 8036 +13
+ Misses 1797 1780 -17
- Partials 712 716 +4
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
|
GCOVR code coverage report https://185.corosio.prtest3.cppalliance.org/gcovr/index.html Build time: 2026-03-03 21:28:35 UTC |
Summary by CodeRabbit
Release Notes