#!/bin/bash ## usage: bash cleanup-Drupal.WhiteSpace.Comma.NoSpace.sh vi ## usage: bash cleanup-Drupal.WhiteSpace.Comma.NoSpace.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.WhiteSpace.Comma.NoSpace' echo Number of lines: 17 echo Examples: 'Array ( [0] => Expected one space after the comma, 0 found ) ' echo Press ENTER to begin read edit_at_line 'CRM/Logging/ReportSummary.php' 192 edit_at_line 'api/v3/Generic/Setvalue.php' 70 edit_at_line 'api/v3/GroupContact.php' 226 edit_at_line 'api/v3/Job.php' 416 edit_at_line 'api/v3/LineItem.php' 51 edit_at_line 'api/v3/Mailing.php' 202 edit_at_line 'api/v3/MailingContact.php' 66 edit_at_line 'api/v3/MailingContact.php' 87 edit_at_line 'api/v3/MailingEventQueue.php' 56 edit_at_line 'api/v3/Membership.php' 210 edit_at_line 'api/v3/utils.php' 1832 edit_at_line 'api/v3/utils.php' 1910 edit_at_line 'tests/phpunit/api/v3/ContributionTest.php' 466 edit_at_line 'tests/phpunit/api/v3/ContributionTest.php' 467 edit_at_line 'tests/phpunit/api/v3/ContributionTest.php' 468 edit_at_line 'tests/phpunit/api/v3/ContributionTest.php' 470 edit_at_line 'tests/phpunit/api/v3/ContributionTest.php' 1157