DD2480-G12 / libphonenumber

Google's common Java, C++ and JavaScript library for parsing, formatting, and validating international phone numbers.
Apache License 2.0
0 stars 0 forks source link

Calculate code complexity for AsYouTypeFormatter::inputDigitWithOptionToRememberPosition #4

Open newinteger opened 2 years ago

newinteger commented 2 years ago

lizard gives a CCN of 19

newinteger commented 2 years ago

I counted it to 19.

  1. Lizard gave the same result
  2. The function is around 70 lines of code which can be seen as long
  3. The function formats a phone number. There are a lot of cases to adhere to so the number of if-statements are not out of place, which gives it the high CCN.
  4. The function does not have any exceptions.
  5. Yes the function is well documented.
spelgubbe commented 2 years ago

I counted it to 19.