If you use spaces, you can check that files are okay by forbidding \t.
If you use tabs, you can check that files are okay by forbidding /^\t* /.
If you use tabs for indentation, spaces for alignment, ??????
If you use tabs, you can check that files are okay by forbidding /^\t* /.
If you use tabs for indentation, spaces for alignment, ??????
I'm sure there is a command-line pre-commit formatter I could use. But I have never tried to set it up, since I can reformat existing code with a couple of keystrokes in my editor.
Most editors have code structure parsing of some kind built-in for tabbing already. E.g. pressing the <tab> key indents the current line to match the structure of surrounding code (or cycles between valid indents for something like Haskell or Python). So they know the difference between initial indentation (that people want to be able to configure visually) and alignment.