Showing 365 of 2,576 total issues
Function _build
has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring. Open
def _build(self, nodes_by_level, keep_build, root_node, profile_host, profile_build, graph_lock,
remotes, build_mode, update):
using_build_profile = bool(profile_build)
missing, invalid, downloads = self._classify(nodes_by_level)
if invalid:
- 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 _content
has a Cognitive Complexity of 32 (exceeds 20 allowed). Consider refactoring. Open
def _content(self):
result = {}
# Generate the config files for each component with name conan_pkgname_compname.xcconfig
# If a package has no components the name is conan_pkgname_pkgname.xcconfig
- 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 deps_install
has 23 arguments (exceeds 10 allowed). Consider refactoring. Open
def deps_install(app, ref_or_path, install_folder, base_folder, graph_info, remotes=None,
Function _parse_compiler_version
has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring. Open
def _parse_compiler_version(defines):
try:
if '__LCC__' in defines and '__e2k__' in defines:
compiler = MCST_LCC
version = int(defines['__LCC__'])
- 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 _get_vars
has a Cognitive Complexity of 31 (exceeds 20 allowed). Consider refactoring. Open
def _get_vars(self):
def append(*args):
ret = []
for arg in args:
if arg:
- 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 content
has a Cognitive Complexity of 30 (exceeds 20 allowed). Consider refactoring. Open
def content(self):
copied_files = []
for dep_name in self.conanfile.deps_cpp_info.deps:
rootpath = self.conanfile.deps_cpp_info[dep_name].rootpath
- 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 from_node
has a Cognitive Complexity of 30 (exceeds 20 allowed). Consider refactoring. Open
def from_node(node):
# TODO: This construction will be easier in 2.0
build, test, host, private = [], [], [], []
for edge in node.dependencies:
if edge.build_require:
- 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 new
has 21 arguments (exceeds 10 allowed). Consider refactoring. Open
def new(self, name, header=False, pure_c=False, test=False, exports_sources=False, bare=False,
Function install_reference
has 21 arguments (exceeds 10 allowed). Consider refactoring. Open
def install_reference(self, reference, settings=None, options=None, env=None,
Function cmd_new
has 21 arguments (exceeds 10 allowed). Consider refactoring. Open
def cmd_new(ref, header=False, pure_c=False, test=False, exports_sources=False, bare=False,
Function export_pkg
has 21 arguments (exceeds 10 allowed). Consider refactoring. Open
def export_pkg(self, conanfile_path, name, channel, source_folder=None, build_folder=None,
Function __call__
has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring. Open
def __call__(self, pattern, dst="", src="", root_package=None, folder=False,
ignore_case=True, excludes=None, keep_path=True):
"""
param pattern: an fnmatch file pattern of the files that should be copied. Eg. *.dll
param dst: the destination local folder, wrt to current conanfile dir, to which
- 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 _build
has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring. Open
def _build(self, args=None, build_dir=None, target=None):
args = args or []
build_dir = build_dir or self.build_dir or self._conanfile.build_folder
if target is not None:
args = ["--target", target] + args
- 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 _process_node
has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring. Open
def _process_node(self, node, pref, build_mode, update, remotes):
# Check that this same reference hasn't already been checked
if self._evaluate_is_cached(node, pref):
return
- 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 update_bundle
has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring. Open
def update_bundle(bundle_path, revisions_enabled):
""" Update both the bundle information as well as every individual lockfile, from the
information that was modified in the individual lockfile. At the end, all lockfiles will
have the same PREV for the binary of same package_id
"""
- 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 _get_upload_modules_with_deps
has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring. Open
def _get_upload_modules_with_deps(uploaded_files, downloaded_files):
modules = []
deps = defaultdict(set) # Reference: [Reference, Reference]
# Extract needed information
for module_id, mod_doc in uploaded_files.items():
- 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_in_windows_bash
has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring. Open
def run_in_windows_bash(conanfile, bashcmd, cwd=None, subsystem=None, msys_mingw=True, env=None,
with_login=True):
""" Will run a unix command inside a bash terminal
It requires to have MSYS2, CYGWIN, or WSL
"""
- 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 _get_metadata_artifacts
has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring. Open
def _get_metadata_artifacts(self, metadata, ref_path, use_id=False, name_format="{}",
package_id=None):
ret = {}
need_sources = False
if package_id:
- 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 constraint
has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring. Open
def constraint(self, constraint_def):
""" allows to restrict a given Settings object with the input of another Settings object
1. The other Settings object MUST be exclusively a subset of the former.
No additions allowed
2. If the other defines {"compiler": None} means to keep the full specification
- 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 __init__
has a Cognitive Complexity of 28 (exceeds 20 allowed). Consider refactoring. Open
def __init__(self, deps_graph, revisions_enabled):
self._nodes = {} # {id: GraphLockNode}
self._revisions_enabled = revisions_enabled
self._relaxed = False # If True, the lock can be expanded with new Nodes
- 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"