handmade.network » Forums » C linter
cstack
Connor Stack
3 posts

None

#12107 C linter
2 months, 2 weeks ago

Does anybody use / know of a good C linter / formatter? I want the equivalent of gofmt for Go or Rubocop for Ruby

None
mmozeiko
Mārtiņš Možeiko
1440 posts
1 project
#12108 C linter
2 months, 2 weeks ago

I have used clang-format a lot. It's is pretty nice, you can configure it to your liking and it has integration into ton of a IDE's/editors.
cstack
Connor Stack
3 posts

None

#12119 C linter
2 months, 2 weeks ago

Awesome, thanks for the tip.

On my mac I was able to `brew install clang-format` then run `clang-format -style=Google -i *.c` to format all my C files with Google's style rules.

None