I got this email from my manager this morning;
Hi ____,
Are you changing the spacing in the JS files that you modify in _____. Every JS file that you have updated has it’s spacing drastically changed which makes merging any ‘real’ changes into the release extremely difficult. If you are not doing this, we need to look at your IDE and stop it doing it.
Now yes I am reformatting the JS files that I use when I have a job that touches the file. There's a very quick extension in Brackets.io that does this for me, and meets the coding standard of the business. (So no I'm not wasting time doing this by hand.) (The only thing being changed by the indenter is obviously 'indentation', changing spaces to tabs, and normalizing the indentation across the document.) (The Only Changes Are Indents)
I'm doing this because the formatting across the document is all kinds of messed up, and with a single keystroke I can bring it all back to standard, and not get losses/confused when working through a document when the indentation suddenly changes.
My manager who sent the email is the person who created the coding standard for the business, forces us to comply with some banal/prosaic things in the coding standard, like "Curly braces must be on a seperate line from the function definition and before the function body, this is for legibility purposes" (Yes that's fine a common standard in some places)
Now if something so simple as curly braces being in the correct place, is important to the coding, am I right to think that I'm justified to respond with something akin to 'suck it up, it's your coding standard, and actually helps the flow of the code, it's only an issue because you've been doing it badly for so long.'
Or more tactfully, what is the workplace way of doing your job to the standard required by the business, while your manager is forcing you to do a sub-standard job. Being that it's "Your responsibility to ensure that all work conforms with the standards and policy documents provided to you, ... it is your responsibility to bring to light or avoid any circumstances that would have a negative outcome for the wider business" (Thank you staff manual)
FYI: Based in England, UK.
EDIT Just a note since it seems popular in answers, I tried the Submit formatting changes separately before beginning my actual work on the file, and this was met with an instant "Don't do that" So although this seems a popular opinion answer, it has not worked for my situation (even though I agree that it should be the simplest intermediate solution) Though this may work for anyone else in the same situation.