Author Topic: The Arcen C# code conventions (whitespace setup) for Visual Studio.  (Read 26443 times)

Offline x4000

  • Chris McElligott Park, Arcen Founder and Lead Dev
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 31,651
-For those using visual studio, in the Tools->Options menu, please use the following spacing formatting for C# files: https://drive.google.com/file/d/1qUt-BI2udMrzPERD8B6e3aTQoKpcOfGj/view?usp=sharing
--Changes from defaults are:
---Insert space within parameter list parentheses
---Insert space within argument list parentheses
---Insert space after keywords in control flow statements
---Insert spaces within parentheses of control flow statements

I believe everything else is the same.  By keeping to one set of code formatting, we avoid having whitespace changes clutter up our svn commits, and in general also prevent ourselves from having inconsistent code formatting.  Note that some of my own recent checkins have been using the wrong auto-formatting, but it also applies to the WeaponMaster changes, since we both had default Visual Studio installs.  Finally got around to fixing that for myself.  Thanks to Badger for pointing out how the codebase was drifting!
Have ideas or bug reports for one of our games?  Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Asteroid

  • Jr. Member
  • **
  • Posts: 65
Re: The Arcen C# code conventions (whitespace setup) for Visual Studio.
« Reply #1 on: September 16, 2019, 01:18:23 am »
I took the liberty to submit to SVN an EditorConfig file to enforce Arcen Games spacing style in all solutions. Supported natively by recent versions of Visual Studio 2017 and above, and by a lot of other editors. Cf https://editorconfig.org and https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-formatting-conventions

Offline Draco18s

  • Resident Velociraptor
  • Core Member Mark V
  • *****
  • Posts: 4,251
Re: The Arcen C# code conventions (whitespace setup) for Visual Studio.
« Reply #2 on: September 16, 2019, 10:11:35 pm »
Good plan