Showing 96 of 152 total issues
File versioneer.py
has 1297 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Version: 0.16
"""The Versioneer - like a rocketeer, but for versions.
The Versioneer
File database.py
has 643 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
File lsp.py
has 455 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
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
File _version.py
has 352 lines of code (exceeds 250 allowed). Consider refactoring. Open
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains the computed version number.
File base_builder.py
has 342 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
Function _findObjects
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def _findObjects(lines):
"""
Returns an iterator with the object name and a dict with info about its
location
"""
- 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
File utils.py
has 329 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
Database
has 31 functions (exceeds 20 allowed). Consider refactoring. Open
class Database(HashableByKey): # pylint: disable=too-many-instance-attributes
"Stores info on and provides operations for a project file set"
def __init__(self): # type: () -> None
self._lock = RLock()
File diagnostics.py
has 321 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
BaseBuilder
has 26 functions (exceeds 20 allowed). Consider refactoring. Open
class BaseBuilder(object): # pylint: disable=useless-object-inheritance
"""
Class that implements the base builder flow
"""
Function do_setup
has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring. Open
def do_setup():
"""Main VCS-independent setup function for installing Versioneer."""
root = get_root()
try:
cfg = get_config_from_root(root)
- 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
HdlCheckerCore
has 24 functions (exceeds 20 allowed). Consider refactoring. Open
class HdlCheckerCore:
"""
HDL Checker project builder class
"""
Function get_versions
has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring. Open
def get_versions(verbose=False):
"""Get the project version from whatever source is available.
Returns dict with two keys: 'version' and 'full'.
"""
- 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 run_command
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
"""Call the given command(s)."""
assert isinstance(commands, list)
p = None
for c in commands:
- 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 run_command
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False):
"""Call the given command(s)."""
assert isinstance(commands, list)
p = None
for c in commands:
- 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 _getBuildSequence
has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring. Open
def _getBuildSequence(self, path, builtin_libraries):
# type: (Path, FrozenSet[Identifier]) -> Iterable[Tuple[Identifier, Path]]
"""
Gets the build sequence that satisfies the preconditions to compile the
given path
- 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 _getRebuilds
has a Cognitive Complexity of 17 (exceeds 5 allowed). Consider refactoring. Open
def _getRebuilds(self, path, line, library):
# type: (Path, str, Identifier) -> Set[RebuildInfo]
"""
Gets info on what should be rebuilt to satisfy the builder
"""
- 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
File msim.py
has 259 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
Function git_pieces_from_vcs
has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring. Open
def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
"""Get version from 'git describe' in the root of the source tree.
This only gets called if the git-archive 'subst' keywords were *not*
expanded, and _version.py hasn't already been rewritten with a short
- 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"