Hello,
For a long time now we have been reviewing changes that contains unwanted trailing whitespaces. To make sure the patch submitter is warned about it, I have enabled trailing whitespace check on mediawiki/core.git
The bug report is: https://bugzilla.wikimedia.org/42628
I have only enabled such check on the mediawiki/core.git repository for now. If that went well I will look up at enabling it on other repos.
cheer,