Inspection Profiles [Set Code Quality Levels]

Visual Expert 2023 comes with predefined code inspection profiles to set the right expectations in terms of code quality and security. In other words, developers can define a tolerance threshold for defects discovered during static code analysis, enabling a build to be deployed without waiting for it to be perfect.

In practice, inspection profiles make it possible to set specific objectives that can be met by the development team.

In the case of a PowerBuilder application, it's not uncommon to work on legacy code up to 5 gigabytes in size, sometimes dating back 25 years. Optimizing such a massive code base takes time. So it's important to set specific goals, achieve them step by step, and gradually raise expectations.

Configuring Code Inspection Profiles

Visual Expert offers five inspection levels to check code quality:

  1. Ideal: thorough and comprehensive
  2. Strict: very rigorous
  3. Moderate: balance between strictness and leniency
  4. Light: verifies only the most critical issues
  5. Legacy code
  6. Create custom profile

The custom profile allows developers to set expectations for each rule individually, according to the specifics of each project. The ability to designate certain rules as mandatory and others as optional ensures a nuanced and personalized approach to code inspection.

Executing Code Analysis

Once the profile has been selected, the next step is to run the code analysis. The results can be viewed directly in the Visual Expert interface, allowing you to explore the results and use Visual Expert's advanced macros, such as impact analysis.

Integrating Code Inspection in CI/CD Workflow

The results can be exported in the standard GUnit format, which can be interpreted by automation servers such as Jenkins, GitLab, or others that support this format.
Developers can stay within their preferred environment leveraging a high-level summary of passed and failed rules and a comprehensive overview of the whole CI/CD pipeline.

Import code profile results in Jenkins

More Documentation on Code Profiles

Visual Expert 2024, PowerBuilder, Code Inspection Profiles, Code Inspection Settings