kengz/spacy-nlp

View on GitHub

Showing 9 of 25 total issues

Function parse_adj has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

def parse_adj(input, options):
    adjCount = 0
    adjArray = []
    resultArray = []
    for doc in nlp.pipe(input, disable=['ner', 'parser', 'textcat']):
Severity: Minor
Found in src/py/nlp.py - About 2 hrs 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

Function parse_date has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

def parse_date(input, options):
    dateCount = 0
    dateArray = []
    resultArray = []
    for doc in nlp.pipe(input, disable=['textcat']):
Severity: Minor
Found in src/py/nlp.py - About 2 hrs 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

Function parse_time has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

def parse_time(input, options):
    timeCount = 0
    timeArray = []
    resultArray = []
    for doc in nlp.pipe(input, disable=['textcat']):
Severity: Minor
Found in src/py/nlp.py - About 2 hrs 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

Function parse_nouns has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

def parse_nouns(input, options):
    nounCount = 0
    nounArray = []
    resultArray = []
    for doc in nlp.pipe(input, disable=['ner', 'parser', 'textcat']):
Severity: Minor
Found in src/py/nlp.py - About 2 hrs 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

Function parse_verbs has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

def parse_verbs(input, options):
    verbCount = 0
    verbArray = []
    resultArray = []
    for doc in nlp.pipe(input, disable=['ner', 'parser', 'textcat']):
Severity: Minor
Found in src/py/nlp.py - About 2 hrs 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

Function parse_named_entities has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

def parse_named_entities(input, options):
    entCount = 0
    entArray = []
    resultArray = []
    for doc in nlp.pipe(input, disable=['textcat']):
Severity: Minor
Found in src/py/nlp.py - About 2 hrs 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

Function handle has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring.
Open

def handle(msg):
    to = msg.get('to')  # the target module, e.g. hello
    intent = msg.get('intent')  # the module's function, e.g. sayHi()
    reply = None
    if to is not None and intent is not None:
Severity: Minor
Found in src/client.py - About 1 hr 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

Function ioClient has 26 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function ioClient() {
  // the child processes,kill all on death
  var children = [];

  /* istanbul ignore next */
Severity: Minor
Found in src/start-io.js - About 1 hr to fix

    Function recv_packet_unicode has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
    Open

    def recv_packet_unicode(self):
        try:
            packet_text = self._connection.recv()
        except websocket.WebSocketTimeoutException as e:
            raise TimeoutError('recv timed out (%s)' % e)
    Severity: Minor
    Found in src/client.py - About 25 mins 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

    Severity
    Category
    Status
    Source
    Language