In Windows -> Preferences -> SonarLint -> Rules Configuration -> Java -> (search cognitive complexity)
, while selecting the rule for cognitive complexity, I was able to set a negative value for the threshold.
I was able to successfully apply the change, and sonar warnings were also generated:
What is the purpose of allowing a negative threshold, or is this a bug?