#!/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: 13 echo Examples: 'Array ( [0] => Line indented incorrectly; expected 6 spaces, found 8 [1] => Line indented incorrectly; expected 2 spaces, found 4 [2] => Line indented incorrectly; expected 4 spaces, found 6 ) ' echo Press ENTER to begin read edit_at_line 'CRM/Core/Resources.php' 261 edit_at_line 'api/v3/Membership.php' 119 edit_at_line 'tests/phpunit/CRM/Contact/BAO/ContactTest.php' 1430 edit_at_line 'tests/phpunit/CRM/Contact/BAO/ContactTest.php' 1448 edit_at_line 'tests/phpunit/CRM/Contact/BAO/ContactTest.php' 1461 edit_at_line 'tests/phpunit/CRM/Contact/BAO/ContactTest.php' 1467 edit_at_line 'tests/phpunit/CRM/Contact/BAO/ContactTest.php' 1482 edit_at_line 'tests/phpunit/CRM/Contact/BAO/ContactTest.php' 1495 edit_at_line 'tests/phpunit/CRM/Contact/BAO/ContactTest.php' 1501 edit_at_line 'tests/phpunit/CRM/Contact/BAO/ContactTest.php' 1526 edit_at_line 'tests/phpunit/CRM/Contact/BAO/ContactTest.php' 1532 edit_at_line 'tests/phpunit/CRM/Contact/BAO/ContactTest.php' 1538 edit_at_line 'tests/phpunit/CRM/Core/Config/MailerTest.php' 59