File core.py
has 453 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This file is part of HDL Checker.
#
# Copyright (c) 2015 - 2019 suoto (Andre Souto)
#
# HDL Checker is free software: you can redistribute it and/or modify
HdlCheckerCore
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class HdlCheckerCore:
"""
HDL Checker project builder class
"""
Function getMessagesByPath
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def getMessagesByPath(self, path):
# type: (Path) -> Iterable[CheckerDiagnostic]
"""
Returns the messages for the given path, including messages
from the configured builder (if available) and static checks
- 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 _handleRebuilds
has a Cognitive Complexity of 12 (exceeds 5 allowed). Consider refactoring. Open
def _handleRebuilds(self, rebuilds):
# type: (Iterable[RebuildInfo]) -> None
"""
Resolves hints found in the rebuild list into path objects
and rebuild them
- 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 _getBuilderMessages
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _getBuilderMessages(self, path):
# type: (Path) -> Iterable[CheckerDiagnostic]
"""
Builds the given path taking care of recursively building its
dependencies first
- 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 configure
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def configure(self, config):
# type: (Dict[Any, Any]) -> None
"Updates configuration from a dictionary"
_logger.debug("Updating with base config:\n%s", pformat(config))
- 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"