I am using visual studio and the default for placing curly bracketts is on the line below the declartion. This feature is nice because when you hit the lower curly bracket on the block it autoformats the code.
Your spec's state to put the curly bracket on the same line as the declartion
private void somemethod (vars) {
...stuff...
...stuff...
}
VS Defaults
private void somemethod (vars)
{
...stuff...
...stuff...
}
Does anyone know how to change this?
Is this in the SLN file? If so can someone change it to the coding style you like?
If this is preserved in the .SUO file I suggest what the SVN manual states.
1) Make a SUO file the way you like things.
2) Change the name of the file name to Opendental.suo.master
3) Commit the master file
4) (optional) Block the committing of .suo files
5) We as user can pull the master file off change the name back to Opendental.suo then we should have your preference for coding style build in to our developing environment.
This would also may reduce the changes that occurr with a commit.
Curly Brackets - coding protocols
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Curly Brackets - coding protocols
It's not in the sln file, and I don't think it's even in the suo file. I will create an export file later.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: Curly Brackets - coding protocols
you change the setting in the text formatting options of VS...but I don't know where it saves that so that everyone will have the same settings
Re: Curly Brackets - coding protocols
What do you mean by "I will create an export file later."
by the way I personally like
method
{
...stuff...
...stuff...
}
I think you can mentally digest the code quicker. But I know it takes up screen realestate - get a bigger monitor. (minimal file size)
by the way I personally like
method
{
...stuff...
...stuff...
}
I think you can mentally digest the code quicker. But I know it takes up screen realestate - get a bigger monitor. (minimal file size)
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Curly Brackets - coding protocols
While it is somewhat arbitrary that the current curly brackets style was chosen, the important thing is for everyone to do it the same. It is possible for a programmer to quickly become accustomed to either way. What's hard is switching back and forth. It is less efficient. So we need to go with the prevailing style, which just also happens to save space.
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
- jordansparks
- Site Admin
- Posts: 5770
- Joined: Sun Jun 17, 2007 3:59 pm
- Location: Salem, Oregon
- Contact:
Re: Curly Brackets - coding protocols
A settings export file has been created. http://www.open-dent.com/manual/codingstyle.html
Jordan Sparks, DMD
http://www.opendental.com
http://www.opendental.com
Re: Curly Brackets - coding protocols
Very cool. Thanks,
Dan
Dan