Provide the option to ignore whitespace differences in Apex
It would be great to have more control over the diff process - particularly to be able to ignore whitespace changes.
If I've made an actual function change to a class, and also auto-indented it, then it would be a lot easier to see the important change if I could hide the whitespace-only changes.
Having the ability to suppress whitespace-only changes on the list of changed objects would be really useful, too.
Thanks for the suggestion.
We have plans to improve the way the diff viewer handles changes and whitespace in the future, though it’s not currently under development.
Thanks,
Jason.
-
Anonymous commented
For some reason our whitespace on a subset of our workflow rules will change ONLY when we propagate that sandbox with a sandbox data seeding tool. Weird but true. I'm ringing this bell with the sandbox seeding tool as well, but would be good to have more robust rules around our thresholds for acceptable and unacceptable whitespace.
-
Troy Hoshor commented
Jodie, please chime in on the case I submitted here on the BusinessOwnerUser topic... I had exactly the same issue as you!
-
Jodie Miners commented
I think my suggestion is a subset of this, so I'm going to add it here.
I would like to be able to use a regex to ignore differences on specific metadata tags within files. Eg the feature for <businessOwnerUser> is such a bad implementation in metdata and you have dealt with it in deployment, but for every field that has that value, it appears as a difference, when it's not a difference at all (it just has the sandbox name appended to the end). So being able to ignore that specific tag and everything between the opening and closing of that tag, would be great. -
Richard Scott commented
I think this improvement would be similar in nature so I wanted to append my comment here. It would also be nice to have a selection to ignore case in compare results.
Thanks!
Richard
-
Justin Clarke commented
Voted. There's currently an issue in Formula, Validation Rule, and Workflow conditions where Salesforce strips out newline characters during the deploy.
It would be very helpful if Gearset could ignore these whitespace differences (spaces, tabs, newlines should all be ignored). Currently if I do a deploy then do a comparison, all these differences pop up when there's no real change other than whitespace. It makes it quite difficult to find the real differences.
If you want to vote for SF to fix this behaviour, vote here:
https://success.salesforce.com/ideaView?id=08730000000hDNwAAM -
Hi all,
We've recently released a new version of our diff viewer which includes character-by-character diff highlighting, and ignores whitespace differences at the start and end of lines.
Hopefully it goes some of the way towards addressing your problem, although it isn't everything you asked for. Lines with only indentation changes won't show up as differences in the diff, and lines with whitespace differences in the middle of lines should now highlight just those differences in a darker colour, which will make it a bit easier to scan.
We'd love to hear if these changes have helped, and even more if they haven't :)
Thanks,
Oli -
Thanks for the suggestion. We have got plans to improve the way we handle whitespace in the diff viewer, but I can't give you a firm ETA just yet. We'll keep you posted when we have an update.
-
Eric Miller commented
Create a way to turn off diff that are caused by spaces, tabs, and returns.