Control flow complexity overflow
I get a strange resharper "suggestion" on a method name.
The suggestion is: "Control flow complexity overflow", which sounds as an internal error. Either that or Resharper is trying to tell me something that I don't understand.
This is the method declaration:
public string getInnehavFond(
string AccNo,
out string Status,
out string wmInternalErrorMsg)
{
See attached screenshot.
Attachment(s):
controlflow.JPG
Please sign in to leave a comment.
This message indicates thet ValueAnalysis failed to analyze this mehod 'cos
it's complexity is too large
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Jonas Nordstrom" <no_reply@jetbrains.com> wrote in message
news:27452349.1166091328938.JavaMail.itn@is.intellij.net...
>I get a strange resharper "suggestion" on a method name.
>
>
And what does that mean for the user? Jonas is right in stating that the
message is not very informative to the user. Make it something like "Method
has excessively complex control flow" (a bit like code analysis warning
CA1502) or the even simpler "Method is overly complex".
Regards,
Erwin
"Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> schreef in
bericht news:elr8pu$c4e$1@is.intellij.net...
>
Sounds like Jonas was right: it is an internal error rather than a code analysis
warning. An error dialog or other message should say "An internal error prevented
Resharper from completing ValueAnalysis." rather than a tool tip talking
about complexity. Is this something we're supposed to fix (by simplifying
our code) or JetBrains will fix in Resharper?
This is not an internal error. But anyway, you are right we should not expose
it to the user. We'll fix that in 2.5.1.
Valentin Kipiatkov
CTO and Chief Scientist
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
>> This message indicates thet ValueAnalysis failed to analyze this
>> mehod 'cos it's complexity is too large
>>
>> --
>> Eugene Pasynkov
>> Developer
>> JetBrains, Inc
>> http://www.jetbrains.com
>> "Develop with pleasure!"
In a way, the internal error (Control flow complexity overflow) can give a better hint, especially in a tool targeted for developers than an intentionally-vague "Internal error". With an error like "Control flow complexity overflow", a developer might be able to figure out that simplifying his code or breaking it into different methods might help.
At first thought yes, but I have seen the same warning for a method that
only had a switch statement for its' body.
Hey, I like the warning, it allows me to prove to my colleagues that
they should simplify their coding style :p
Valentin Kipiatkov (JetBrains) wrote:
>> And what does that mean for the user? Jonas is right in stating that
>> the message is not very informative to the user. Make it something
>> like "Method has excessively complex control flow" (a bit like code
>> analysis warning CA1502) or the even simpler "Method is overly
>> complex".
>>
>> Regards,
>> Erwin
>> "Eugene Pasynkov (JetBrains)" <Eugene.Pasynkov@jetbrains.com> schreef
>> in bericht news:elr8pu$c4e$1@is.intellij.net...
>>
>>> This message indicates thet ValueAnalysis failed to analyze this
>>> mehod 'cos it's complexity is too large
>>>
>>> --
>>> Eugene Pasynkov
>>> Developer
>>> JetBrains, Inc
>>> http://www.jetbrains.com
>>> "Develop with pleasure!"