format-code: move checkers to functions

Move the checkers into functions for better maintainability
and later extensibility.  Since I am making changes to many
lines, also reformat script using 4-step indentation as is
typical in our repos.

Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: Ib736ee3b9a32a361cb2cb280015834435d3514ce
1 file changed