

Ask HN: do you use the 'format code' feature of your IDE? - ziodave

I am using PhpStorm and sometimes I hit the &#x27;Reformat Code&#x27; command. The outcome is good, but eventually I am writing some WordPress-related code and it doesn&#x27;t comply with the formatting guidelines of WordPress [1].<p>Do you use any formatting feature of your IDE, or do you format the code manually?<p>[1] http:&#x2F;&#x2F;make.wordpress.org&#x2F;core&#x2F;handbook&#x2F;coding-standards&#x2F;
======
Artemis2
I'm currently programming in Go, and Google provides very strict constrains
for its syntax (e.g. no braces on a new line, etc.). To take this a step
further, my editors automatically runs the go fmt tool on saved files, which
formats the code according to the guidelines for the style. That means
indenting with tabs, aligning with spaces...

That's very pleasing that a language in an early stage has this kind of tools,
because if I need to copy a code snippet from the web, it will almost
everytime be formatted exactly like my own code. Same when I work with
somebody else: no discussion over code formatting.

~~~
ziodave
I can see something similar exists for PHP/WordPress
[https://github.com/squizlabs/PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer)

