Automate your Code Reviews with SSW Code Auditor

As a project or company grows, managing code standards throughout your team becomes virtually impossible. But consistent code is crucial to future development and maintenance. SSW Code Auditor lets you take control of your code and automatically review your web apps and projects - giving you more opportunity to spend time where it really matters.

Here at SSW, we face the problem of maintaining our standards across nearly five thousand web pages, over twenty active projects in both Visual Basic (6 and .NET) and C-Sharp. There comes a point where a tool to check (or audit) our work would need was needed, this tool is SSW Code Auditor.

How do you plan on using SSW Code Auditor

SSW Code Auditor User Guide

  1. Prerequisites
  2. Tip: Add to your Favourites
  3. Running SSW Code Auditor Wizard
  4. Creating New Rule
  5. Creating Regular Expression
  6. The Reports
  7. Tools | Options
  1. Prerequisites

    1. To install, view the Installation User Guide
    2. To register, view the Registration User Guide

  2. Tip: Add to your Favourites

    Add SSW CodeAuditor Visual Studio Extension to your Favourites. Download Link: SSW Code Auditor - VS Extension

    Add SSW CodeAuditor Visual Studio Extension to your Favourites
    Figure: Add to your Favourites
  3. Running SSW Code Auditor Wizard

    When you run the SSW Code Auditor there will be a step by step wizard to guide you through the audit process.

    Code Auditor Welcome Screen
    Figure: Run SSW Code Auditor

    Select Job
    Figure: Select a predefined Job or create a new one

    Select Files
    Figure: Add the paths to scan

    Available scan types
    Figure: Available scan types - Files, Folders, URLs, VS Solutions and Projects

    Select Rules
    Figure: Select the rules you want to run

    Email Schedule
    Figure: Indicate where you'd like the report issued to

    Start Process
    Figure: SSW Code Auditor can be run on a schedule from the command line

    Ready to start
    Figure: Ready to start the scanning process

    Scanning in progress
    Figure: Scanning in progress

    Results are in
    Figure: Results are in! Let's view the report

    Figure: Finished! Thanks for using SSW Code Auditor

  4. Creating New Rule

    To see a detailed walkthrough of how to create a new regular expression rule from scratch, see the Regular Expression Rule Tutorial.

    To create a new rule for a Job:

    1. Select the designated Job and click next to the Rules Definition page.
    2. Click "Add..." on the bottom right of the Rules ListView.
    3. Select "Create a new rule" from the radio option and enter name for the new rule.
      Add new rule
      Figure: Create a new rule

      Available methods to create new rule
      Figure: Choose different methods to create a new rule

    4. Add general information of this rule.
      General tab
      Figure: General information of this rule

    5. Enter the regular expression used by this rule and a regular expression in the search-in field to filter the files this rule run on.
      Search tab
      Figure: Search information of this rule

      Code sample
      Figure: C# code for another rule search pattern

    6. Tick the checkbox and enter the replacement text to automatically fix your code.
      Replace tab
      Figure: Replacement text of this rule

    7. You can test your regular expression on some simple test string before running it on your projects.
      Test tab
      Figure: Simple regular expression testing

    8. Change History tab
      Figure: Change history of this rule

    9. Statistics tab
      Figure: Statistics of this rule

    10. Rule Exceptions tab
      Figure: Rule exceptions

  5. Create Regular Expression

    The following images show how to create your expression.

    Regular Expression Wizard
    Figure: Figure: Use the powerful Regular Expression wizard to build patterns

    Regular Expression Wizard 2
    Figure: The wizard also shows you any group matchings, this information is very useful when you are building find & replace patterns

    Regular Expression Wizard 3
    Figure: Figure: The wizard provides a testing ground for your Regular Expression

    Regular Expression Wizard 3
    Figure: You see check the regular expression in a more human readable way here

    More information on regular expressions.

  6. The Reports

    Sample Report
    Figure: Job Report - before (Bad)

    Sample Report
    Figure: Job Report - after (Good)

  7. Tools | Options

    Figure: Code Auditor Settings for Reports

    Check-in Policy
    Figure: Code Auditor Settings for TFS Check-in Policy

Want to reminisce – see the old page + screenshots