A new era in code analysis: personalised rules in GoQu

A new era in code analysis: personalised rules in GoQu

Code quality is no longer just a technical concern – it is a strategic priority. Yet many teams still struggle with static analysis tools that enforce rigid, one-size-fits-all rules. These tools often overlook the nuanced, evolving needs of modern development environments, where teams face unique technical challenges, compliance obligations and performance expectations. The result? Developers are forced to either manually enforce internal standards or work around tools that don't reflect their reality. There's a clear need for smarter, more adaptable solutions. 

GoQu, a static code analysis tool from Sollers, has introduced a new feature called Custom Template Rules. This enhancement allows users to create personalised code analysis rules based on pre-existing templates, directly addressing the need for greater control over code quality standards. This customisation enables teams to define and enforce their own, specific coding requirements. 

More and more companies today understand that code quality isn’t just a developer concern. It directly affects operational efficiency, system maintenance costs, and security. That is why an increasing number of them are investing in code quality analysis tools. The leading tools are those that allow the creation of custom rules. 

Why does rule customisation matter so much? 

There’s no one-size-fits-all standard when it comes to software development. Different companies – and even different teams within the same company – have different priorities, constraints, and coding standards. In practice, that means rigid rules for the entire process of writing code can be ineffective. Flexibility is essential. Companies, however, have specific ways in which they want their code to be written, in the same way that they might have their own rules about how customer service should be handled. 

Think of customisation like having a toolbox of rules for building all kinds of structures - not just big or small ones, but ones with entirely different purposes. A treehouse, a boat, and a greenhouse might be similar in size, but each requires its own set of building rules, materials, and safety standards. In the same way, different software projects - even within the same organisation - can have very different goals, constraints, or compliance requirements. That’s why having the ability to customise development rules is essential. 

Here are a few examples of how teams might customise their own code analysis rules to fit their needs: 

  • one team might want to block the use of a deprecated class; 
  • another needs to detect comments that contain sensitive data or inappropriate language; 
  • yet another may want to track the use of specific methods that impact performance. 

Thanks to customisation, each team can now define what code quality means to them – and enforce it in a way that fits seamlessly into their daily workflow. 

This is where Custom Template Rules come in. They empower developers to define and enforce their own standards. Whether it’s flagging outdated code, preventing sensitive data leaks, or optimising performance, teams can tailor the rules to match their specific goals. 

Custom Template Rules in GoQu 

From the beginning, GoQu has focused on practicality and flexibility. So when a common request at the end of customer meetings was, "We need to be able to create our own code analysis rules," the answer was simple. 

To meet this need, we developed the Custom Template Rules feature, which allows users to create their own code analysis rules based on prebuilt templates. For organisations, this means one thing: complete control over what’s analysed and how. 

How does it work in practice? 

This new functionality is built on top of template rules – ready-made templates that serve as the foundation for creating custom rules. A user selects a template (e.g. tracking disallowed method calls) and customises it. The result is a fully personalised rule, deployed in their project. 

In the first phase of the rollout, we introduced four base templates: 

  • RSPEC-3688: Track usage of disallowed classes, 
  • RSPEC-2253: Track usage of disallowed methods, 
  • RSPEC-4011: Track usage of disallowed constructors, 
  • RSPEC-124: Track comments matching a regular expression. 

Current architecture makes it easy to create new rules whether by our team or by the clients themselves. It not only increases flexibility but accelerates code quality enforcement in new projects. 

Key benefits for organisations 

The implementation of Custom Template Rules brings clear advantages – both technical and business-driven: 

  • personalization – rules can be tailored to specific project or team needs; 
  • speed – templates dramatically reduce the time needed to create new rules; 
  • ease of maintenance – updates to templates automatically apply to all related custom rules; 
  • scalability – a single custom rule can be reused across multiple teams and projects; 
  • version compatibility – the solution integrates with current and future versions of SonarQube and GoQu; 
  • transparency – the rule structure is clear, which simplifies adoption and collaboration across teams. 

The implementation journey 

Before development began, we carried out a structured analysis process: 

  • gathering client requirements – asking clients what they needed and wanted; 
  • evaluating technical feasibility of integration with SonarQube – checking if it was possible for this new feature to work well with SonarQube tool; 
  • preparing architecture diagrams and data flow documentation – creating visual plans and descriptions of how the new feature would work. 

What’s next? 

Custom Template Rules are just the beginning. We're already working on further GoQu improvements, including: 

  • a wider selection of security related rules to help prevent security issues in the code; 
  • a growing set of quickfixes – automatic suggestions to fix code issues that are specific to coding best practise; 
  • a broader range of Custom Template Rules for more complex use cases. 

Summary 

The introduction of Custom Template Rules marks a major step forward in creating a more flexible, scalable, and effective approach to code quality. It’s a direct response to real client feedback – and a clear example of how product development can be driven by actual user needs. 

Organisations that adopt this solution gain a true advantage: the ability to adapt faster, manage internal standards more effectively, and raise the quality of their code without unnecessary overhead. 


Article content

Patryk Ladzinski , Senior Developer at Sollers Consulting

Dawid Wątroba

Java/Gosu Developer | IT engineering and consultancy delivered by Sollers Consulting

1mo

Great article, very insightful! Thank you Patryk 😉

To view or add a comment, sign in

More articles by Sollers Consulting

Others also viewed

Explore topics