Skip to main content

Side Project: Sweeper

So aside from a couple more minor touchups on the blog's theme, I'm also working fairly-actively on an add-in for Visual Studio. I plan on open-sourcing it although I have not yet done so. I'm not sure how exactly I want to release it and exactly what license I want to use.

Here's the low down. A while back I was introduced to StyleCop, a tool for enforcing a set of standard coding styles. Chris Trevino, a coworker of mine was the one that introduced it to me and talks about it in his blog post here. I bucked against it at first but quickly saw that it lead to clean, readable, consistent code. I found that sometimes it's a bit anal but hey, it's consistently anal.

What drove me nuts though is that some of the things are so absolutely simple, so completely trivial that it should take care of them for you,

So, I've begun an add-in to automate those trivial things for you. Take the following example, which throws 64 StyleCop violations:

  1. using System;
  2. using System.Text;
  3. using System.Windows.Forms;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.Data;
  7. using System.Drawing;
  9. using System.Linq;
  12. namespace TestProjForAddin
  13. {
  15.     public partial class Form1 : Form
  16.     {
  17.         public Form1()
  18.         {
  20.             InitializeComponent();
  21.         }
  23.     }
  24. }
  30. namespace test2
  31. {
  35.     /// <summary>
  36.     /// Test class for testing the addin.
  37.     /// </summary>
  38.     public class Test
  39.     {
  43.         /// <summary>
  44.         /// Is a monkey...
  45.         /// </summary>
  46.         private class Monkey
  47.         {
  48.             /// <summary>
  49.             /// private monkey
  50.             /// </summary>
  51.             private void monkey2()
  52.             {
  54.                 for (int i = 0; i < 10; i++)
  55.                 {
  57.                 }
  59.             }
  61.             public void monkey1()
  62.             {
  64.                 if (true)
  65.                 {
  67.                 }
  69.             }
  72.         }
  74.         /// <summary>
  75.         /// Gets or sets a test3
  76.         /// </summary>
  77.         private string Test3 { get; set; }
  79.         public Test()
  80.         {
  82.         }private List<string> test = new List<string>();
  83.         private string Test2()
  84.         {
  85.             return String.Empty;
  86.         }
  88.         void test5()
  89.         {
  91.         }
  93.         /// <summary>
  94.         /// Look into the void.
  95.         /// </summary>
  96.         public void Test4()
  97.         {
  99.         }
  102.     }
  104. }

Then, after running Sweeper (so-called because you're sending in a sweeper team to take care of your mess before the StyleCop shows up...cheesy much?):

  1. namespace TestProjForAddin
  2. {
  3.     using System.Windows.Forms;
  5.     public partial class Form1 : Form
  6.     {
  7.         public Form1()
  8.         {
  9.             InitializeComponent();
  10.         }
  11.     }
  12. }
  14. namespace test2
  15. {
  16.     using System;
  17.     using System.Collections.Generic;
  19.     /// <summary>
  20.     /// Test class for testing the addin.
  21.     /// </summary>
  22.     public class Test
  23.     {
  24.         private List<string> test = new List<string>();
  26.         public Test()
  27.         {
  28.         }
  30.         /// <summary>
  31.         /// Gets or sets a test3
  32.         /// </summary>
  33.         private string Test3 { get; set; }
  35.         /// <summary>
  36.         /// Look into the void.
  37.         /// </summary>
  38.         public void Test4()
  39.         {
  40.         }
  42.         void test5()
  43.         {
  44.         }
  46.         private string Test2()
  47.         {
  48.             return String.Empty;
  49.         }
  51.         /// <summary>
  52.         /// Is a monkey...
  53.         /// </summary>
  54.         private class Monkey
  55.         {
  56.             public void monkey1()
  57.             {
  58.                 if (true)
  59.                 {
  60.                 }
  61.             }
  63.             /// <summary>
  64.             /// private monkey
  65.             /// </summary>
  66.             private void monkey2()
  67.             {
  68.                 for (int i = 0; i < 10; i++)
  69.                 {
  70.                 }
  71.             }
  72.         }
  73.     }
  74. }

And we're down to only 17 violations. These consist of:

  • A lack of documentation - you should be writing this on your own. There's other addins like GhostDoc which will help you with this. Maybe I can add support for automatically calling it on running Sweeper?
  • Lack of breaking the namespaces into 2 separate files - I'm not sure I want to automate least not without prompting...
  • Lack of a file header - Personally I don't like the file headers, and also I don't know what to automatically populate it with.
  • Lack of access modifiers - probably could easily implement this, as long as I'm sure to avoid the things that shouldn't have modifiers like declarations within interfaces
  • Method names being of the wrong case - I don't think this should be automated.


  1. What do you think?
  2. Would you use it?
  3. What features do you want added that can be safely automated?



Clean those dirty monkeys!

The MoD in the United Kingdom

The MoD in the United Kingdom has opted to disclose its complete archive of reported UFO sightings in the skies around the UK. These records and sketches detail reported experiences or encounters with unidentified flying objects within UK airspace.
like it

I think that this side

I think that this side project of adding animations and automations would boost the website. I saw similar works on custompaperservice's website and that's seriously improved their outlook.

Wow great,Only a genius could

Wow great,Only a genius could do something like that,I was with the when I read about this incredible post,It really has caught my eyes,Would love to see more.

In case the many web owners

In case the many web owners on-line ended up while valuable because you, we may use a intelligent entire world. What i'm saying is among the best Academic Help I realize We've trained ones by way of your current websites. It can be difficult to acquire very good support on-line along with My spouse and i want to take pleasure in anyone to the very good operate.

My super cool buddy outlined

My super cool buddy outlined to my advice your blog, thus i notion I’d look over it all meant for average joe. Rather appealing ideas, shall be to come back meant for even more! Office Tephone System Dubai

In this way, if only for

In this way, if only for reliability and in light of the fact that you on no account know what surprising things may happen when another person do my paper (it's dependably the others that are inept) changes the code, I generally put chains, since it makes the source system more meaningful, snappier to parse by your cerebrum.

On the off chance that the

On the off chance that the many web proprietors on-line wound up while profitable in light of the fact that you, we may utilize a shrewd whole world. What i'm stating is among the best Ez Assignment service UK I understand We've prepared ones by method for your present sites. It can be hard to get great support on-line alongside My life partner and i need to enjoy anybody to the great work.


nice bLog! its interesting. thank you for sharing.... redmi 4a

cccam server

This is highly informatics, crisp and clear. I think that everything has been described in systematic manner so that reader could get maximum information and learn many things. cccam server

Thank you for taking the time

Thank you for taking the time to publish this information very useful! Darius Fisher status labs

thanks for the tips and

thanks for the tips and information..i really appreciate it..Maxtread

Adding these new features and

Adding these new features and the styles will enhance the website in a pretty effective way. It will definitely provide a professional look and will make the users so easy to handle the operations. Thanks for sharing the information. more info here


Im no expert, but I believe you just made an excellent point. You certainly fully understand what youre speaking about, and I can truly get behind that. Xender

friends with benefits

You know your projects stand out of the herd. There is something special about them. It seems to me all of them are really brilliant! friends with benefits



My Recent Posts Blackmart Apk

***You Tv Player

A sweeper's job is difficult

A sweeper's job is difficult and involves a lot of hardwork, patience, and courage!! hats off to all those sweepers!! Thanks for this article !! Need More Info Check In Here

Wonderful article, thanks for

Wonderful article, thanks for putting this together! This is obviously one great post. Thanks for the valuable information and insights you have so provided here.


I have reviewed the code that is pretty helpful for me. It will provide me a good academic papers help to write a programming assignment for my college.

An individual's song is

An individual's song is certainly impressive. You will have certain rather qualified musicians and artists. That i like everyone one of the best for results. Buy Panasonic PABX Kenya

Please share more like

Please share more like that.voyance


Your colleagues are generally raging on the subject of a items also now I just discover why.


Good blog along with the excellent quality stuff and I’m sure this will be greatly helpful.

In your blogging, it will be

In your blogging, it will be sharp you will be the perfect guy to help you about as much as possible authoring.


I simply noticed utilizing display this once again. Recommend what ever I needed to determine confidence via future you'll probably stay with regards to displaying this particular fantastic set up. male health hub reviews testogen

Install MovieBox App

Facing issues while downloading the Moviebox app on your mobile devices? Check out the different types of solutions which makes you to get a clear picture for your any question like moviebox for windows computer , MovieBox App on apple tv and moviebox apk dowload iOS,etc.


That would characteristic short-term, but it’s not really a efficient long-term reply to with respect to individuals who want to wind up being utilizing this 1 specific partner some people can’t avoid bearing in mind.

Indoor Grill

thanks for the information you shared with everyone checkout this awsome guide on indoor grill from here :-

Paper shredder

Thus, these best small paper shredders are of great importance and they are effective too.

it was a wonderful chance to

it was a wonderful chance to visit this kind of site and I am happy to know. thank you so much for giving us a chance to have this opportunity.. lucky patcher


I considered out your blog since In relation to around seen so much in connection with your articles or blog posts.

Being a writer of

Being a writer of, I would like to say that you for sharing the possible solution for a programming assignment.


This is also a very good post which i really enjoyed reading. It is not everyday that i have the possibility to see something.


As you mentioned here, the tool is looking quite simpler than the usual ones. There are a whole lot of options provided with the tool related to standard coding styles. Have you tried this in the blog? Please update the details of the tool.


Excellent website combined with outstanding top quality products and also I’m positive this will be tremendously beneficial. gynectrol review at


Wonderful article i've got to declare along with cheers to the data. Education and learning is undoubtedly a sticky issue. On the other hand, remains to be one of several primary matters of our own occasion. My spouse and i take pleasure in your current article along with expect additional.


Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog.

nice post

Get 75% OFF for writing services such as essay, dissertation, thesis, assignment, coursework and more


Checking any blog may make others just want to come up with a greater number of. I did a fabulous which i was first lovely content by means of. The software most likely conducted for the tier still it’s exceptional. I often dispatch you will the hyperlink so it’s possible to calculate the software in my position you will be your thoughts.


This reviewer returning lower of this information sites can be quite distinct.

Method names being of the

Method names being of the wrong case - I don't think this should be automated.

I don't think this should be automated

Method names being of the wrong case - I don't think this should be automated.

Jual Laptop Notebook PC HP Lenovo Printer Tinta Toner Epson Mura

Great weblog combined with the superb high quality things as well as I’m certain this is significantly useful. brestrogen reviews


That can job short-term, however , it’s no possible long-term choice meant for individuals who want to get the real key an individual exceptional girlfriend these can’t avoid wondering about.

I think this code will be

I think this code will be helpful for the students who are trying to do their projects in the same pattern as given here. They can refer the code and can make changes if possible. Without out copying the code they can change it according to their own way.wholesale tablet

Great weblog combined with

Great weblog combined with the superb high quality things as well as I’m certain this is significantly useful. mc hjelmer

Garden grow lights can be

Garden grow lights can be necessary if you want to have successful indoor vegetable gardens or herb gardens. By not using garden grow lights you may cause your plants to become spindly, lose their leaves and fail to bloom or set fruit.
nutrisystem deals

popcorn time app

Movies and video streaming is one of the most popular moments for all of us and that is why it is important to know all Best Popcorn Time Alternatives

I think this is an

I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. free movie download no registration

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <asp>, <c>, <cpp>, <cs>, <css>, <drupal5>, <drupal6>, <html4strict>, <java>, <javascript>, <jquery>, <php>, <python>, <ruby>, <sql>, <xml>. The supported tag styles are: <foo>, [foo]. PHP source code can also be enclosed in <?php ... ?> or <% ... %>.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.