#!/bin/bash ## usage: bash cleanup-Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma.sh vi ## usage: bash cleanup-Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma.sh joe [ -n "$1" ] && EDITOR="$1" if [ -z "$EDITOR" ]; then echo "Please provide parameter 1 (editor). Example: vi, joe" exit 1 fi function edit_at_line() { local f="$1" local l="$2" $EDITOR +$l "$f" } echo Process cleanup for 'Generic.Functions.FunctionCallArgumentSpacing.TooMuchSpaceAfterComma' echo Number of lines: 10 echo Examples: 'Array ( [0] => Expected 1 space after comma in function call; 2 found ) ' echo Press ENTER to begin read edit_at_line 'CRM/Contact/BAO/Contact/Utils.php' 515 edit_at_line 'CRM/Contact/Form/Search/Builder.php' 341 edit_at_line 'CRM/Contribute/Form/CancelSubscription.php' 61 edit_at_line 'CRM/Core/BAO/Setting.php' 301 edit_at_line 'CRM/Logging/ReportDetail.php' 66 edit_at_line 'CRM/Logging/ReportDetail.php' 67 edit_at_line 'CRM/Logging/ReportDetail.php' 225 edit_at_line 'CRM/Logging/ReportDetail.php' 227 edit_at_line 'CRM/Utils/Hook.php' 346 edit_at_line 'tests/phpunit/CRM/Core/Payment/BaseIPNTest.php' 137