Since release 15.3.0 Sonargraph allows a pattern based approach to ignore cycle groups. For example, if you would like to ignore all cycles between domain classes and 'domain' is part of the architecture filter name of a class you could define the pattern '**/domain/**' and as long as a cycle group only contains classes matching this pattern, the cycle group will be ignored and not generate an issue.
The pattern is matched to the architecture filter name of elements. To determine the architecture filter name you can select an element in the navigation view and the architecture filter name of the element will be displayed in he properties view. The architecture filter name of directories or namespaces ends with '/**'. This ending will be removed for the purpose of pattern matching.The concept of architecture filter names is explained in Section 11.1, “ Models, Components and Artifacts ”.
You create a pattern based cycle filter by using the command "New Pattern Based Cycle Ignore Filter..." from a context menu or from the "File/New/Other" menu. That starts a two page wizard. On the first page you select the kind of cycle groups you would like to ignore and can add a name and a description. On the second page you can specify include and exclude patterns. The allowed wildcards are explained on the wizard page. A cycle matches the filter if all elements match any of the include patterns and none of the exclude patterns.
Include patterns can be marked as mandatory. That allows you to have more specific rules when a cycle is matched. lets assume you want to allow cycles between API classes and services. In that case you would specify two mandatory include patterns: '**/api/**' and '**/services/**'. Now a cycle is only matches if both patterns are matched by the cycle group. That would mean that cycles that only contain API classes or only contain service classes would not be matched. Only if the cycle contains both API and service classes a match will occur.
We created this feature based on customer feedback. If it is possible to define pattern based rules it saves the operator the effort to manually inspect every cycle group to see which ones must be ignored.