#!/bin/bash ## usage: bash cleanup-Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace.sh vi ## usage: bash cleanup-Drupal.WhiteSpace.OpenBracketSpacing.OpeningWhitespace.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.OpenBracketSpacing.OpeningWhitespace' echo Number of lines: 28 echo Examples: 'Array ( [0] => There should be no white space after an opening \"{\" [1] => There should be no white space after an opening \"(\" ) ' echo Press ENTER to begin read edit_at_line 'CRM/Activity/BAO/Activity.php' 2615 edit_at_line 'CRM/Contribute/Form/AbstractEditPayment.php' 260 edit_at_line 'CRM/Contribute/Form/AbstractEditPayment.php' 442 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 435 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 438 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 544 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 1114 edit_at_line 'CRM/Member/BAO/Membership.php' 1915 edit_at_line 'CRM/Member/Page/Tab.php' 161 edit_at_line 'CRM/Price/BAO/PriceField.php' 330 edit_at_line 'CRM/UF/Page/ProfileEditor.php' 230 edit_at_line 'CRM/Upgrade/Snapshot/V4p2/Price/BAO/Field.php' 286 edit_at_line 'CRM/Utils/Cache/APCcache.php' 113 edit_at_line 'CRM/Utils/Signer.php' 102 edit_at_line 'CRM/Utils/System/Drupal6.php' 476 edit_at_line 'CRM/Utils/System/Drupal8.php' 160 edit_at_line 'CRM/Utils/System/Drupal8.php' 177 edit_at_line 'CRM/Utils/Token.php' 763 edit_at_line 'api/v3/utils.php' 527 edit_at_line 'tests/phpunit/api/v3/EventTest.php' 434 edit_at_line 'tests/phpunit/api/v3/PledgeTest.php' 193 edit_at_line 'tests/phpunit/api/v3/PledgeTest.php' 196 edit_at_line 'tests/phpunit/api/v3/ReportTemplateTest.php' 105 edit_at_line 'tests/phpunit/CiviTest/CiviUnitTestCase.php' 192 edit_at_line 'tests/qunit/example/test.js' 3 edit_at_line 'tests/qunit/example/test.js' 5 edit_at_line 'tests/qunit/example/test.js' 8 edit_at_line 'tests/qunit/example/test.js' 10