Code analysis
- Updated: 2024/11/06
Code analysis
Code analysis (code review) enables you to evaluate a program without running the code. When you review the code, a list of violations based on a set rules are displayed. You can review and fix any coding or stylistic errors for your automation (Task Bots or API Tasks).
Code analysis enables you to form certain code structures with which you can implement coding best practices and make the code maintainable, reliable, efficient, and secure.
Important: You must have Enterprise Platform license to apply code analysis rules to API Tasks and to use the AI governance rule. See Enterprise Platform.
Benefits
Code analysis provides you the following benefits:
- Implement coding best practices by enforcing certain coding conventions.
- Authorize Citizen Developer to introduce new automations.
- Enable complex automations to be more accessible.
- Improve code readability and quality.
- Control the structure of your automation code.
- Improve productivity of the developer and the platform as good coding practise improves the automation quality over time.
Code analysis for user roles
- Lead RPA Developer (Administrator)
- Configure code analysis policies that define coding best practices in the
organization. Monitor and report the status of code quality based on
adherence to these policies. Code analysis enables certain coding practices
and principles to be enforced which in turn helps with the following:
- Facilitate the development of automation by a larger pool of business personnel, for example, a Citizen Developer who might not have strong software development skills.
- Improve maintenance of automations by reducing code complexity and improving readability.
- Improve reliability of automations by reducing errors.
- Improve security and compliance of automations by enforcing secure coding practices.
- Reduce production time and costs of automation.
- Citizen Developer or RPA Developer
- Code analysis provides guidance to develop automations that meet
organizational requirements for the following:
- Error reduction
- Code readability and maintenance
- Code security
Permissions
You require the following permissions to set up a code analysis policy.
- View policies: Allows you to view the code analysis policy that defines how developers can build automations.
- Manage policies: Allows you to view, edit, and assign policies that defines how developers can build automations. This permission allows the assignment of policies to folders for which you have access.
For code analysis enforcement, you require the
permissions mentioned below. These permissions are active when code analysis is enabled
in
- Enable enforcement for bot check-in: A default permission in all roles which allows the user to check-in the automation file if it has no code analysis violations.
- Allow check-in with low severity violations: This optional permission allows the user to check-in the automation file if it has low severity code analysis violations.
- Allow check-in with high severity violations: This optional permission allows the user to check-in the automation file if it has high severity code analysis violations.
Important: Starting with Automation 360 v.29, all the system
roles (such as AAE_Basic or AAE_Admin) will have only the permissions to check in bots with no violations. All the custom roles
(user-defined roles) are updated to contain both the permissions to check in with low
and high severity violations. For enforcement, you should edit your custom roles to
restrict check-in. If you use only system-defined roles for your users, to configure
enforcement, you must create new roles to assign the appropriate permissions to check
in bots with violations.
Components
- Policy editor: Contains multiple named policies for all Control Room users.
- Rules: As the foundation of code analysis, rules help to evaluate bot code. Rules can be simple or complex depending on the evaluation that is performed. Rules include coding practices that can be verified. They apply to packages and actions in the automation code. A rule consists of a unique RULE_CODE and a description to indicate the nature of evaluation to be performed on the code.
For more information on code analysis, see Leveraging code analysis and debug tool to improve and optimize your automation development.