benoitsan / BBUncrustifyPlugin-Xcode

Xcode plugin to format source code using ClangFormat or Uncrustify
MIT License
1.19k stars 150 forks source link

Avoid formatting on save when no config is specified #74

Closed danydev closed 9 years ago

danydev commented 9 years ago

Since I don't want uncrustify to format the code on save when I'm working on third party code, would be ideal that uncrustify would not apply any format when you don't have a uncrustify configuration file set in the location mentioned on the settings menu (even if option to uncrustify on save is ON): uncrustify.cfg, _uncrustify.cfg, .uncrustify.cfg, .uncrustifyconfig
, In addition: your Home Folder and ~/.uncrustify/uncrustify.cfg

Maybe indicating in the settings menu which file is currently using to format the code would also increase UX (warning the user when no file is specified)

What do you think? it makes sense for you?

danydev commented 9 years ago

Pull request at #98 @benoitsan let me know what you think about this, thanks!