Exporting ReSharper settings (with a twist)

So I have a little bit of a different question... Our shared ReSharper (and StyleCop) settings are essentially our coding standard where I'm at.

Now let's say I needed to generate a WRITTEN coding standard as well. One option would be to manually go through setting by setting and generate a document. Of course that makes maintaining that document a bit more manual as well.

So let's say I wanted to take an exported ReSharper settings file, read it, and generate a regular text file from it. Maybe even with the example templates that ReSharper displays when changing code formatting settings...

Could that be done? I recognize that this may not exist, but am almost willing to write a plugin for it. The specific points of interest would be:

1. Exporting a COMPLETE settings file, even with defaults defined (Otherwise, the program in question would need to know what those defaults were as well...)
2. Reading the config file, and looping through all code formatting (or other section keys)
3. Getting the text displayed in ReSharper for each setting (e.g. if these are stored in a keyed resource file or something?)
4. Getting the text for each setting's exaple code (assuming these get run through the actual code inspection system to get the result?)
3. Writing out a text, html, etc., file with the text combined, e.g.:

Brace Style: K&R


if (true) {


So, how feasible would this be? I could certainly just take the config file and parse out the settings with some regex real quick, and put the setting value after it. This would still leave getting a good textual label for that setting (as I'd only have the setting key to go on), and the example text with the setting applied (again, assume this would require calling into the code inspection APIs to do?)

Please sign in to leave a comment.