Test output files should be exactly as defined with regard to trailing whitespace. This keeps editorconfig from breaking those files.
Use EditorConfig to define a some basic styling rules for code. This should also help to reduce the number of commits introducing trailing whitespace. See http://editorconfig.org/ for details.