[MonoDevelop] Code cleanup options
ibboard at gmail.com
Wed Sep 15 15:09:37 EDT 2010
Mike has just closed Bug 595578  (Allow "Format Document" on save) -
I knew he'd come round to my suggestion in the end ;) - so I thought I'd
start a discussion about some of the details.
I use Eclipse during the day, and while it has too many options in some
parts, I think the auto-formatting is really useful and well done. We
use it at work to ensure consistency between developers and with coding
standards, as well as being a lazy way to fix up white space and indent
issues etc. without you having to think about it.
Personally, I think formatting should (if possible) be a project setting
as it would make it easier for developers to be consistent on a project.
As an example, all of my code uses the "Method(args)" and brackets on
their own lines style, while MD uses "Method (args)" and brackets on the
same line as the block statements (but not methods etc). If the settings
were per-project with a fall-back to the IDE (like the existing default
policies) then I'd be able to work on MD and my code without worrying
about whether I was formatting each one correctly.
In terms of available options, I think MD is fairly close to the core of
the options that Eclipse has, but a bit more boolean. Some of the
Eclipse options can take numbers (like the amount of new lines to
maintain, which is useful for pruning down gaps). Some of the other
options are also a bit more flexible (I think it is a "always, never,
when necessary" option) but that might be less important.
Any thoughts or opinions?
More information about the Monodevelop-list