SonarLint allowing negative threshold for Cognitive complexity

While changing the rules configuration for Cognitive complexity in eclipse, a negative value is being accepted. Sonar warnings are also generated.

In eclipse

Windows -> Preferences -> SonarLint -> Rules Configuration -> Java -> (search cognitive complexity)

image

The below is a sample sonar warning generated:

Hello Gautham.
Welcome to the Sonarsource community and thanks for your report.
Looks like a bug to me. We will investigate and i’ll get back with answer on this topic.
Have a good day.

1 Like