Skip to content

Commit

Permalink
try with not failing generation
Browse files Browse the repository at this point in the history
  • Loading branch information
Tofel committed Aug 9, 2024
1 parent edfbebd commit d747856
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
8 changes: 3 additions & 5 deletions contracts/scripts/ci/generate_slither_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ run_slither() {
fi

SLITHER_OUTPUT_FILE="$TARGET_DIR/$(basename "${FILE%.sol}")-slither-report.md"

output=$(slither --config-file "$CONFIG_FILE" "$FILE" --checklist --markdown-root "$REPO_URL" --fail-none $SLITHER_EXTRA_PARAMS)
if [ $? -ne 0 ]; then
if ! output=$(slither --config-file "$CONFIG_FILE" "$FILE" --checklist --markdown-root "$REPO_URL" --fail-none $SLITHER_EXTRA_PARAMS); then
>&2 echo "::warning::Slither failed for $FILE"
return 0
fi
Expand Down Expand Up @@ -80,8 +78,8 @@ set +e
process_files "$SOURCE_DIR" "$TARGET_DIR" "${FILES[@]}"

if [[ $? -ne 0 ]]; then
>&2 echo "::error::Failed to generate Slither reports"
exit 1
>&2 echo "::warning::Failed to generate some Slither reports"
exit 0
fi

echo "Slither reports saved in $TARGET_DIR folder"
2 changes: 1 addition & 1 deletion contracts/scripts/ci/generate_uml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ process_selected_files() {
MATCHES=($(find "$SOURCE_DIR" -type f -path "*/$FILE"))

if [[ ${#MATCHES[@]} -gt 1 ]]; then
>&2 echo "Error: Multiple matches found for $FILE:"
>&2 echo "::error:: Multiple matches found for $FILE:"
for MATCH in "${MATCHES[@]}"; do
>&2 echo " $MATCH"
done
Expand Down
2 changes: 1 addition & 1 deletion contracts/scripts/ci/select_solc_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ set +e
SOLCVER=$(extract_pragma "$FILE")

if [[ $? -ne 0 ]]; then
echo "Error: Failed to extract the Solidity version from $FILE."
>&2 echo "::error:: Failed to extract the Solidity version from $FILE."
return 1
fi

Expand Down

0 comments on commit d747856

Please sign in to comment.