Cognitive Complexity - negation and parentheses in logical expressions

Hi, @Michael!

It’s 1C (BSL) - language of 1C:Enterprise. I’ve posted a NEW RELEASE announce some time ago - [NEW RELEASE] 1C (BSL) Community Plugin 1.0.1

You can find used cognitive complexity computer implemantation here (as it is a part of BSL Language Server) - https://github.com/1c-syntax/bsl-language-server/blob/develop/src/main/java/org/github/_1c_syntax/bsl/languageserver/context/computer/CognitiveComplexityComputer.java and resource file https://github.com/1c-syntax/bsl-language-server/blob/develop/src/test/resources/context/computer/CognitiveComplexityComputerTest.bsl

Hm, looks like it is the most difficult part of computing :slight_smile: I’ll try to implement it based on your test.

It would be cool, if this clarification will be placed at whitepaper.

Thanks! Cognitive complexity is a main feature for 1.1 sonar-community-plugin release (besides 9 new rules) :slight_smile:

3 Likes