Configuring Static Analysis tools for source control deliveries

You can configure the IBM® Engineering Workflow Management client for Microsoft Visual Studio IDE to run a static analysis tool on Visual Studio projects before you deliver changes to a Engineering Workflow Management source control repository. You can set up your team's process to not allow source code delivery if the static analysis fails.

About this task

The project administrator normally configures this precondition. You can set up the precondition to use the Microsoft FxCop tool or any other custom tool that you can run from the command line and that accepts DLL as an input file to analyze.
Note: The static analysis tool integration only supports C# and VB project types. The C++ project type is not supported.

Procedure

  1. In the Eclipse client, in the project area editor, click the Process Configuration tab.
  2. In the Configuration area, expand Team Configuration and click Operation Behavior.
  3. In the Operations area, expand Source Control and click Deliver (client).
  4. Select the Preconditions and follow-up actions are configured for this operation check box.
  5. Click Add.
  6. In the Add Preconditions dialog box, select Require Static Analysis Run (Microsoft Visual Studio Client) and click OK.
  7. To use the Microsoft FxCop static analysis tool, complete the following steps:
    1. In the Select the Tool to run drop-down menu, select Microsoft FxCop.
    2. In the Tool Name field, accept the default or change the name. This name is displayed when error messages are listed in the Team Advisor window.
    3. In the Tool Home field, type the location of FxCopCmd.exe. The location can be an Environment variable, such as ${FXCOP_HOME}.
    4. In the Arguments field, type any additional arguments to pass to the FxCopCmd.exe command.
    5. In the Projects to exclude field, type a comma-separated list of project names to exclude from analysis.
  8. To use a custom tool, complete the following steps:
    1. In the Select the Tool to run drop-down menu, select Custom Tool.
    2. In the Tool Name field, accept the default or change the name. This name is displayed when error messages are listed in the Team Advisor window.
    3. In the Tool Command field, type the name of the command to execute.
    4. In the Tool Home field, type the tool location. The location can be an Environment variable.
    5. In the Arguments field, type any additional arguments to pass to the command. To invoke the custom tool, specify how to provide the input file to the command by using the ${0} argument. Also specify how to generate the output file by using the ${1} argument. For example, for the Scan.exe command, use the –file argument to specify the input file and the -out argument to generate the output file. The Arguments field specifies the following: -input ${0} -out ${1}.xml.
    6. In the Projects to exclude field, type a comma-separated list of project names to exclude from analysis.
  9. Click Apply changes.
  10. Click Save.

video icon Video

Jazz.net channel
Software Education channel

learn icon Courses

IoT Academy
Skills Gateway

ask icon Community

Jazz.net
Jazz.net forums
Jazz.net library

support icon Support

IBM Support Community
Deployment wiki