This project has moved. For the latest updates, please go here.

Coding standards:

  • CodeAnalysis:
    • ALL projects should enable "Enable Code Analysis on Build" and "Suppress results from generated code".
    • Feature projects (e.g. not samples, tools, tests, etc.) should enable the "Microsoft All Rules" ruleset.
    • Any suppressions should be included directly in the source and must pass code review.
  • StyleCop:
    • Install the VS plugin from here: http://stylecop.codeplex.com/
    • Run stylecop manually before submitting any pull requests.
    • StyleCop is enabled by default in the command line build and the CI build so any failures break the build.
    • The rules are defined in Settings.StyleCop at the root of the repo and apply to all projects.
    • StyleCop is not good at enforcing alternative rules (e.g. require using statements to be outside of the namespace), so additional changes may be required in code review. When in doubt, follow the existing style.

Unit tests:

  • Each project has an associated unit test project.
  • XUnit is the test framework of choice.
  • The VS 2012 extension is available here: http://visualstudiogallery.msdn.microsoft.com/463c5987-f82b-46c8-a97e-b1cde42b9099
  • All of the tests should pass on a Win8 machine without any special setup or admin privileges (except the SSL tests, see below).
  • Most tests should pass on Win7 except the WebSocket tests.
  • SSL tests require setting up a server certificate. From an elevated VS developer command prompt run \tests\Microsoft.Owin.Host.HttpListener.Tests\SetupProject.bat to install a test certificate.
  • Tests for client side SSL certificates may fail if you have smart card client certificates in your cert store (e.g may promt for a pin). Delete these certs or file an issue for re-working these tests.

Last edited Mar 26, 2013 at 1:42 AM by howarddierking, version 1

Comments

No comments yet.