Skip to content
Close

Enabling AI to assess code for compliance against software architecture design principles​

Service Provided Digital Modernization
Capabilities Utilized Code assessment and evaluation

The overall health of the client’s application was evaluated by analyzing Java code repositories against the architecture team’s design principles. This assessment exceeded the capabilities of static code compliance tools.  We utilized tools such as Microsoft Copilot in GitHub Code spaces and developed a Proof of Concept to trigger automatic analysis of all project repositories using OpenAI APIs and GitHub actions.​

Client challenge

The client’s architecture team established 13 design principles for code compliance. They encountered challenges in analyzing the codebase of over 57 Java code repositories to ensure adherence to these principles and assess the overall application health. Due to the architecture group’s limited familiarity with the code’s technology stack, our team was engaged to assist with the code analysis and assessment, identify issues, and report them to the development teams. These issues could then be addressed to enhance the overall quality of the codebase.

Our solution

At the project’s outset, we were assigned the task of manually evaluating all 57+ Java code repositories within three months, identifying violations, and subsequently raising GitHub issues for the development team to address. To expedite the evaluation process, we promptly transitioned to utilizing Copilot.

We meticulously documented the violations for each repository, analyzed their severity level (Blocker, Critical, Major, Minor, Info), and generated GitHub Issues for all Major violations. Additionally, we scrutinized the MegaLinter logs and furnished guidance and recommendations regarding the linter rules to be implemented across enterprise applications.

Results

Over 1,200 classes underwent assessment within 3 months, and 270 GitHub issues were submitted to the development team. The assessment revealed 15,000+ issues and violations. Automation of code repository analysis for design principal compliance drastically reduced the time required from weeks to minutes. For instance, manual analysis of a code repository containing 400 Java files for code violations previously required 2 weeks. Utilizing Copilot chat in GitHub Codespaces decreased this duration to 3-4 days, and further automation employing a Python script and Azure OpenAI’s Chat Completion API reduced the time to approximately 20 minutes with a cost of approximately $2 using the GPT-4o model.

Additional Case Studies

Enhancing customer experience through Product-driven innovation

This Product transformation helped bridge the gap between business and IT, modernize outdated systems, and align technology efforts with customer needs.
Close