hackedteam/test-av

View on GitHub

Showing 1,005 of 1,471 total issues

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

    def exportChildren(self, outfile, level, namespace_='maec:', name_='Memory_Action_AttributesType', fromsubclass_=False):
        if self.Start_Address is not None:
            self.Start_Address.export(outfile, level, namespace_, name_='Start_Address')
        if self.Source_Address is not None:
            self.Source_Address.export(outfile, level, namespace_, name_='Source_Address')
Severity: Minor
Found in lib/maec/maec11.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

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

    def exportLiteralChildren(self, outfile, level, name_):
        if self.Start_Address is not None:
            showIndent(outfile, level)
            outfile.write('Start_Address=model_.xs_hexBinary(\n')
            self.Start_Address.exportLiteral(outfile, level, name_='Start_Address')
Severity: Minor
Found in lib/maec/maec11.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

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

    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
        if nodeName_ == 'Existing_File_Name':
            Existing_File_Name_ = child_.text
            Existing_File_Name_ = self.gds_validate_string(Existing_File_Name_, node, 'Existing_File_Name')
            self.Existing_File_Name = Existing_File_Name_
Severity: Minor
Found in lib/maec/maec11.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

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

    def buildAttributes(self, node, attrs, already_processed):
        value = find_attr_value_('status', node)
        if value is not None and 'status' not in already_processed:
            already_processed.append('status')
            self.status = value
Severity: Minor
Found in lib/maec/maec11.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

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

    def exportLiteralChildren(self, outfile, level, name_):
        if self.Process_Base_Address is not None:
            showIndent(outfile, level)
            outfile.write('Process_Base_Address=model_.xs_hexBinary(\n')
            self.Process_Base_Address.exportLiteral(outfile, level, name_='Process_Base_Address')
Severity: Minor
Found in lib/maec/maec11.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