Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
chevdor committed Sep 29, 2021
1 parent 94a3dbc commit b9a69d8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions scripts/github/extrinsic-ordering-filter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ FILE=$1

# Higlight indexes that were deleted
function find_deletions() {
printf "\n## Deletions\n"
echo "\n## Deletions\n"
RES=$(cat "$FILE" | grep -n '\[\-\]' | tr -s " ")
if [ "$RES" ]; then
echo "$RES" | awk '{ printf "%s\\n", $0 }'
Expand All @@ -19,7 +19,7 @@ function find_deletions() {

# Highlight indexes that have been deleted
function find_index_changes() {
printf "\n## Index changes\n"
echo "\n## Index changes\n"
RES=$(cat "$FILE" | grep -E -n -i 'idx:\s*([0-9]+)\s*(->)\s*([0-9]+)' | tr -s " ")
if [ "$RES" ]; then
echo "$RES" | awk '{ printf "%s\\n", $0 }'
Expand All @@ -30,7 +30,7 @@ function find_index_changes() {

# Highlight values that decreased
function find_decreases() {
printf "\n## Decreases\n"
echo "\n## Decreases\n"
OUT=$(cat "$FILE" | grep -E -i -o '([0-9]+)\s*(->)\s*([0-9]+)' | awk '$1 > $3 { printf "%s;", $0 }')
IFS=$';' LIST=("$OUT")
unset RES
Expand All @@ -45,11 +45,11 @@ function find_decreases() {
fi
}

printf "\n------------------------------ SUMMARY -------------------------------"
printf "\n⚠️ This filter is here to help spotting changes that should be reviewed carefully."
printf "\n⚠️ It catches only index changes, deletions and value decreases".
echo "\n------------------------------ SUMMARY -------------------------------"
echo "\n⚠️ This filter is here to help spotting changes that should be reviewed carefully."
echo "\n⚠️ It catches only index changes, deletions and value decreases".

find_deletions "$FILE"
find_index_changes "$FILE"
find_decreases "$FILE"
printf "\n----------------------------------------------------------------------\n"
echo "\n----------------------------------------------------------------------\n"

0 comments on commit b9a69d8

Please sign in to comment.