sgammon/GUST

View on GitHub
java/gust/backend/model/ObjectModelDeserializer.kt

Summary

Maintainability
F
4 days
Test Coverage

Method build has a Cognitive Complexity of 277 (exceeds 50 allowed). Consider refactoring.
Open

  /**
   * Load a raw set of mapped data, from underlying storage, into a message builder so that it may be constructed into
   * a concrete Protobuf representation.
   *
   * @param builder
Severity: Minor
Found in java/gust/backend/model/ObjectModelDeserializer.kt - About 4 days to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

Avoid deeply nested control flow statements.
Open

              if (dataValue is Map<*, *>) {
                // prepare the sub-builder, then attach to the top-level field
                this.build(subBuilder, dataValue as Map<String, Any>)
                builder.setField(field, subBuilder.build())
              } else {
Severity: Major
Found in java/gust/backend/model/ObjectModelDeserializer.kt - About 45 mins to fix

TODO found
Open

                      TODO("recursive inflation of references not yet supported")

There are no issues that match your filters.

Category
Status