Run code analysis

As a Bot Creator (RPA developer) or Citizen Developer, you can run code analysis to evaluate your automation files for any coding errors. You can develop automations based on the code analysis policies and predefined rules.

Prerequisites

You must have View content permission to download the code analysis results in CSV format.

  • You can run code analysis only on automation files (Task Bot and API Task) that are error-free. If your automations contain errors, the Run Code Analysis option is not enabled. Resolve the errors in your automation to see the Run Code Analysis option.
  • Code analysis automatically runs on all the automation files with the Not Scanned status in the public workspace, thereby providing visibility on the coding best practices for all the automations in the in the public repository. Code analysis runs every five minutes and scans 1000 automation files in five minutes.
  • When you run code analysis, if there is a change in the code analysis results status, the last modified time of the automation file is updated.

Procedure

  • Run code analysis in the private workspace:
    1. On the Automation page, select the automation file (Task Bot or API Task), click the actions menu (vertical ellipsis), and click Run Code Analysis.
      A message is displayed indicating that code analysis is successfully completed, along with a file link with the result of the code analysis.
    2. Click the file link to analyze the result of code analysis.
      A CSV file with the result of code analysis is displayed.
    3. Click Close.
  • Run code analysis in the public workspace: Run code analysis by choosing one of the following options:
    OptionSteps
    Run Code Analysis
    1. On the Automation page, select the automation file, click the actions menu (vertical ellipsis), and click Run Code Analysis.
    2. Select the version of the automation for which to run code analysis:
      1. Latest version
      2. Product label
    3. Click Continue.

      A message is displayed indicating that code analysis is successfully completed, along with a file link with the result of code analysis.

    4. Click the file link to analyze the result of code analysis.

      A CSV file with the result of code analysis is displayed.

    5. Click Close.
    View history Task Bot
    1. On the Automation page, select the automation file, click the actions menu (vertical ellipsis), and click View history Task Bot.

      All the versions of the selected bot are displayed on top showing the latest version.

    2. Select a version of the automation, click the actions menu (vertical ellipsis), and click Run Code Analysis.

      A message is displayed indicating that code analysis is successfully displayed, along with a file link with the result of code analysis.

    3. Click the file link to analyze the result of code analysis.

      A CSV file with the result of code analysis is displayed.

    4. Click Close.
    The following video shows the two ways of running code analysis in the public workspace: