#!/bin/bash ## usage: bash cleanup-Drupal.WhiteSpace.ScopeIndent.Incorrect.sh vi ## usage: bash cleanup-Drupal.WhiteSpace.ScopeIndent.Incorrect.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.ScopeIndent.Incorrect' echo Number of lines: 42 echo Examples: 'Array ( [0] => Line indented incorrectly; expected 4 spaces, found 5 [1] => Line indented incorrectly; expected 2 spaces, found 3 [2] => Line indented incorrectly; expected 12 spaces, found 24 [3] => Line indented incorrectly; expected 6 spaces, found 7 [4] => Line indented incorrectly; expected 6 spaces, found 4 [5] => Line indented incorrectly; expected 8 spaces, found 4 [6] => Line indented incorrectly; expected 8 spaces, found 6 [7] => Line indented incorrectly; expected 6 spaces, found 8 [8] => Line indented incorrectly; expected 8 spaces, found 10 [9] => Line indented incorrectly; expected 10 spaces, found 8 [10] => Line indented incorrectly; expected 12 spaces, found 10 [11] => Line indented incorrectly; expected 2 spaces, found 4 ) ' echo Press ENTER to begin read edit_at_line 'CRM/Contact/Form/Merge.php' 343 edit_at_line 'CRM/Contact/Form/Task/AlterPreferences.php' 48 edit_at_line 'CRM/Contact/Form/Task/Label.php' 282 edit_at_line 'CRM/Contact/Form/Task/Label.php' 369 edit_at_line 'CRM/Contact/Form/Task/LabelCommon.php' 324 edit_at_line 'CRM/Contact/Form/Task/LabelCommon.php' 326 edit_at_line 'CRM/Contact/Form/Task/Print.php' 59 edit_at_line 'CRM/Contribute/BAO/Query.php' 698 edit_at_line 'CRM/Contribute/BAO/Query.php' 700 edit_at_line 'CRM/Contribute/BAO/Query.php' 859 edit_at_line 'CRM/Contribute/Form/AdditionalInfo.php' 488 edit_at_line 'CRM/Contribute/Form/AdditionalInfo.php' 491 edit_at_line 'CRM/Contribute/Form/Contribution.php' 973 edit_at_line 'CRM/Contribute/Form/UpdateSubscription.php' 228 edit_at_line 'CRM/Contribute/Form/UpdateSubscription.php' 236 edit_at_line 'CRM/Contribute/Form/UpdateSubscription.php' 257 edit_at_line 'CRM/Contribute/Form/UpdateSubscription.php' 263 edit_at_line 'CRM/Contribute/Form/UpdateSubscription.php' 265 edit_at_line 'CRM/Contribute/Form/UpdateSubscription.php' 275 edit_at_line 'CRM/Contribute/Import/Parser/Contribution.php' 276 edit_at_line 'CRM/Contribute/Import/Parser/Contribution.php' 277 edit_at_line 'CRM/Contribute/Import/Parser/Contribution.php' 278 edit_at_line 'CRM/Contribute/Import/Parser/Contribution.php' 279 edit_at_line 'CRM/Contribute/Import/Parser/Contribution.php' 282 edit_at_line 'CRM/Core/BAO/OptionValue.php' 116 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 1008 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 1011 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 1014 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 1017 edit_at_line 'CRM/Core/BAO/RecurringEntity.php' 1020 edit_at_line 'CRM/Core/I18n/Schema.php' 226 edit_at_line 'CRM/Logging/Differ.php' 91 edit_at_line 'CRM/Logging/Differ.php' 94 edit_at_line 'CRM/Logging/Differ.php' 97 edit_at_line 'CRM/Logging/Differ.php' 100 edit_at_line 'CRM/Logging/Differ.php' 103 edit_at_line 'CRM/Logging/Differ.php' 115 edit_at_line 'CRM/Logging/Differ.php' 118 edit_at_line 'CRM/Logging/Differ.php' 119 edit_at_line 'CRM/Logging/Differ.php' 128 edit_at_line 'CRM/Logging/Differ.php' 131 edit_at_line 'api/v3/Membership.php' 119