Showing 5 of 8 total issues
Function test_single_doxygen_warning
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def test_single_doxygen_warning(self):
file_errors = parse_doxygen("error: Doxyfile not found and no input file specified!")
self.assertEqual(len(file_errors), 1)
for i, (filename, errors) in enumerate(file_errors.items()):
if i == 0: # pragma: no branch
- Read upRead up
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 test_single_file_warning
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def test_single_file_warning(self):
file_errors = parse_doxygen(
"C:/Users/John Hagen/ClionProjects/test/main.cpp:40: warning: "
"Compound Class is not documented."
)
- Read upRead up
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 test_single_doxygen_warning_no_space
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def test_single_doxygen_warning_no_space(self):
file_errors = parse_doxygen(
r"bar.h:3:warning: the name 'FOO' supplied as the second argument in the \file "
r"statement is not an input file"
)
- Read upRead up
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 generate_test_suite
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def generate_test_suite(
errors_by_filename: Dict[str, Set[DoxygenError]]
) -> ElementTree.ElementTree:
"""Generates JUnit XML file from parsed errors.
- Read upRead up
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_doxygen
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def parse_doxygen(error_text: str) -> Dict[str, Set[DoxygenError]]:
"""Parses doxygen output.
Generic doxygen messages use 'doxygen' as the file name.
- Read upRead up
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"