Perfectionist’s hell or SQL formatting

Hi folks As a programmer-perfectionist I have a habit which is killing me. Every time I need to add some script to SQL file, I am formatting it manually. I would like to get a tool which would format SQL for me but everything I’ve tried has some flaws. I tried online formatters, stand-alone tools …