http://blogs.clariusconsulting.net/kzu

Daniel Cazzulino's Blog

Go Back to
kzu′s Latest post

Contributing to OSS projects made easy

I recently came across what I believe is a missing feature (bug?) in Json.NET most excellent library: when using custom constructor, default values are not populated for properties :(

Being open source, I just went to its GitHub project, created the mentioned Issue, and proceeded to fork the repo.

Immediately after getting the source and opening the VS solution, I noticed it used different settings than my default ones, i.e. it uses two whitespace “tabs”. That’s typically the first barrier to contributing: am I supposed to now go to the project website, read some coding standards page, change my VS settings to match, just to start coding?

Luckily, I also noticed alongside the solution, the Newtonsoft.Json.vssettings file. Now that’s useful! Not only that, but by being named the same as the solution file (just changing the file extension), it’s automatically picked up by the  Quick Settings extension! What this means is that just by opening the Newtonsoft.Json.sln, my current settings are backed-up, the new settings are loaded, and I’m ready to code. Once I close the solution, my previously backed-up settings are re-applied and I can go on working with my own style preferences :) .

 

So, I just had to go ahead, write my repro test, fix it, push to my fork and send my pull request. Now THAT’s a great way to remove the first barrier to contributing to open source projects :) .

 

I just wish every project (including mine :S) provided this mechanism *always*.

Comments

4 Comments

  1. [...] Contributing to OSS projects made easy – Daniel Cazzulino discusses a simple, yet good thing to make it easier for people to contribute to your Open Source projects by providing a settings file to allow the user’s environment to be configured as per your projects coding style. [...]

  2. Great article!
    There is also a free option for QuickSettings, Visual Studio Settings Switcher (http://goo.gl/AXakrv) is a OSS project that do the basic settings switch.

  3. Thanks for the pointer Luiz, but this means it’s very much unsuitable for the kind of easy contribution path I’ve explained:

    “Settings Switcher associates a solution with a settings file by writing the path of the selected .vssettings file to the solution’s .suo file. “

  4. I think this is a better alternative http://editorconfig.org/
    It supports many editors and is open source.