EXXETA / EXXETA/sonar-esql-plugin

esql:NavigatingTreeCouldBeReference - Rule Behavior Issue

Open
#119 6 comments 1 reaction 1 assignee Claimed by @ThomasPohl View on GitHub
enhancement
Dominant language
Java
Stars
37
Forks
38
PR merge metrics
No merged PRs in 30d

Description

Hi,

We recently upgraded to Sonar Server 7.9 and along with that upgraded the sonar-esql-plugin from 2.3.5 to 3.0.1. However, after this upgrade, projects for which we had clean reports started showing major issues after re-run with the "**Navigating message tree could be replaced by a reference**" Rule. (We have classified this as a major rule and we have build breakers in place with a threshold of 0 for this).

The behavior seems off as it reports major issue if the occurrence of two level tree structure is more than 3. For the following case, it seems to be not applicable -

![image](https://user-images.githubusercontent.com/43881486/86134589-1e331800-baea-11ea-8001-2f83b6522e42.png)

There is no other way in our knowledge that we can create a reference for XMLNSC.Attribute.

Also, in case of the compliant solution, if **reqRef.age** occurs more than 3 times, it will be reported as an issue.

![image](https://user-images.githubusercontent.com/43881486/86134662-330fab80-baea-11ea-929f-a8cfc622d236.png)

This default threshold however seems to be unchanged compared to the earlier version. So, the behavior of rule has changed it seems.

Please suggest if this is working as expected or needs an enhancement.

Thanks.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.