Introduction to Code Analyzer for ABL
- Last Updated: May 27, 2021
- 3 minute read
- OpenEdge
- Version 12.2
- Documentation
Code Analyzer for ABL (CABL) is a third-party plugin. While installing OpenEdge 12.0, you will have the option to install Code Analyzer for ABL. If you choose to install Code Analyzer for ABL, the plugin will get installed in Progress Developer Studio for OpenEdge.
Code Analyzer for ABL continuously analyzes and measures the quality of your code and highlights any problems. Code Analyzer for ABL also provides recommendations on how to fix the problem. This helps to achieve coding best practices and to improve product performance.
You can run Code Analyzer for ABL on a specific file, a set of files, recently changed files or even the complete project.
- Analyze changed files
- Analyze
- Bind to a SonarQube project
- Analyze
- Exclude
- Analyzer Properties — This property allows you to configure the analyzer options.
- File Exclusions — This property allows you to choose the file(s) to be excluded from analysis.
To include the file again, select File Exclusions in your project Properties and then remove the specific file.
Code Analyzer for ABL also allows you to review highlighted issues in the editor. To do this, place your cursor on the red circle marker on the left of the line of code.
- General Code Analyzer for ABL Settings — In this tab, you can configure the severity of the Code Analyzer for ABL marker.
- Analyzer Properties — This property allows you to configure the analyzer options.
- File Exclusions — This property allows you to choose the file(s) to be excluded from analysis.
- Miscellaneous — This property allows you to provide usage statistics to the software provider anonymously.
- Rules Configuration — You can enable rules by clicking on the checkboxes accordingly.
After modifying any of the properties, click Apply or Apply and Close.
Views
- Code Analyzer for ABL Issue Location — In this panel, you can view the exact location of the issue.
- Code Analyzer for ABL On-The-Fly — In this panel issues are displayed and updated as you type your code.
- Code Analyzer for ABL Report — This panel opens by default when you open Developer Studio. This provides you with a comprehensive report of the issues in the file(s) or project.
- Code Analyzer for ABL Rule Description — This panel provides you with the details of all available rules.
- SonarQube Servers — This panel allows you to connect to SonarQube server.
Rules
Code Analyzer for ABL for OpenEdge comes preconfigured with six complementary rules. To enable them, click on the checkboxes in the tab. Click the arrow beside Code Analyzer for ABL and from the list, select Rules Configuration. Check oe and oedb to enable the six rules for ABL code.
- oe
- Backslash in string — highlight backslash character in strings, as they are compiled differently on UNIX and Windows
- MD5 / SHA1 usage — reports usage of outdated hash algorithms
- Unused variables — highlight variables which are neither read nor written during the flow of execution
- CAN-DO in WHERE clause — highlight usage of CAN-DO in a WHERE clause, causing performance issues
- Detect WholeIndex — on database tables (if XML XREF is activated in PDSOE)
- oedb
- No indexes — highlights table where no index is defined (applies to DF files)
To review the rule descriptions, right-click on the issue in the Code Analyzer for ABL Report panel and click Rule Description. The Rule Description panel is displayed with the details.
More customized rules can be created if needed. To know how to create rules, refer to SonarQube rules
For more information on Code Analyzer for ABL, refer to Get started with SonarQube and CABL - Code Analyzer for ABL.