#!/bin/bash ## usage: bash cleanup-Drupal.Formatting.SpaceInlineIf.SpacingBefore.sh vi ## usage: bash cleanup-Drupal.Formatting.SpaceInlineIf.SpacingBefore.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 'Drupal.Formatting.SpaceInlineIf.SpacingBefore' echo Number of lines: 7 echo Examples: 'Array ( [0] => Expected 1 space before \"?\"; newline found [1] => Expected 1 space before \":\"; newline found ) ' echo Press ENTER to begin read edit_at_line 'CRM/Mailing/Event/BAO/Bounce.php' 272 edit_at_line 'CRM/Mailing/Selector/Event.php' 435 edit_at_line 'CRM/Mailing/Selector/Event.php' 436 edit_at_line 'CRM/Mailing/Selector/Event.php' 440 edit_at_line 'CRM/Mailing/Selector/Event.php' 441 edit_at_line 'CRM/Mailing/Selector/Event.php' 443 edit_at_line 'CRM/Mailing/Selector/Event.php' 444