#!/bin/bash ## usage: bash cleanup-Drupal.WhiteSpace.OperatorSpacing.SpacingAfter.sh vi ## usage: bash cleanup-Drupal.WhiteSpace.OperatorSpacing.SpacingAfter.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.OperatorSpacing.SpacingAfter' echo Number of lines: 6 echo Examples: 'Array ( [0] => Expected 1 space after \"=>\"; 2 found [1] => Expected 1 space after \"=\"; 2 found ) ' echo Press ENTER to begin read edit_at_line 'api/v3/Mailing.php' 555 edit_at_line 'api/v3/Mailing.php' 561 edit_at_line 'api/v3/Mailing.php' 567 edit_at_line 'api/v3/Mailing.php' 573 edit_at_line 'api/v3/Mailing.php' 579 edit_at_line 'api/v3/Membership.php' 227