#!/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' 2628 edit_at_line 'CRM/Contribute/Form/AbstractEditPayment.php' 260 edit_at_line 'CRM/Contribute/Form/AbstractEditPayment.php' 443 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 438 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 441 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 549 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 1121 edit_at_line 'CRM/Member/BAO/Membership.php' 1922 edit_at_line 'CRM/Member/Page/Tab.php' 161 edit_at_line 'CRM/Price/BAO/PriceField.php' 331 edit_at_line 'CRM/UF/Page/ProfileEditor.php' 231 edit_at_line 'CRM/Upgrade/Snapshot/V4p2/Price/BAO/Field.php' 287 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' 481 edit_at_line 'CRM/Utils/System/Drupal8.php' 158 edit_at_line 'CRM/Utils/System/Drupal8.php' 175 edit_at_line 'CRM/Utils/Token.php' 772 edit_at_line 'api/v3/utils.php' 530 edit_at_line 'tests/phpunit/api/v3/EventTest.php' 434 edit_at_line 'tests/phpunit/api/v3/PledgeTest.php' 192 edit_at_line 'tests/phpunit/api/v3/PledgeTest.php' 195 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