Showing 365 of 2,576 total issues
Function architecture_flag
has a Cognitive Complexity of 42 (exceeds 20 allowed). Consider refactoring. Open
def architecture_flag(settings):
"""
returns flags specific to the target architecture and compiler
"""
compiler = settings.get_safe("compiler")
- 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 info
has a Cognitive Complexity of 41 (exceeds 20 allowed). Consider refactoring. Open
def info(self, *args):
"""
Gets information about the dependency graph of a recipe.
It can be used with a recipe or a reference for any existing package in
- 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 _loads_cpp_info
has a Cognitive Complexity of 39 (exceeds 20 allowed). Consider refactoring. Open
def _loads_cpp_info(text, filter_empty):
pattern = re.compile(r"^\[([a-zA-Z0-9._:-]+)\]([^\[]+)", re.MULTILINE)
try:
# Parse the text
- 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 lock_node
has a Cognitive Complexity of 39 (exceeds 20 allowed). Consider refactoring. Open
def lock_node(self, node, requires, build_requires=False):
""" apply options and constraints on requirements of a node, given the information from
the lockfile. Requires remove their version ranges.
"""
# Important to remove the overrides, they do not need to be locked or evaluated
- 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_order
has a Cognitive Complexity of 39 (exceeds 20 allowed). Consider refactoring. Open
def build_order(self):
""" This build order uses empty PREVs to decide which packages need to be built
:return: An ordered list of lists, each inner element is a tuple with the node ID and the
reference (as string), possibly including revision, of the node
- 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 vs_installation_path
has a Cognitive Complexity of 38 (exceeds 20 allowed). Consider refactoring. Open
def vs_installation_path(version, preference=None):
if not preference:
preference = get_env("CONAN_VS_INSTALLATION_PREFERENCE", list())
if not preference: # default values
- 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 remove_packages
has a Cognitive Complexity of 37 (exceeds 20 allowed). Consider refactoring. Open
def remove_packages(self, ref, package_ids):
""" Remove any packages specified by package_ids"""
self.check_credentials()
if ref.revision is None:
- 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 detect_compiler_id
has a Cognitive Complexity of 37 (exceeds 20 allowed). Consider refactoring. Open
def detect_compiler_id(executable, runner=None):
runner = runner or ConanRunner()
# use a temporary file, as /dev/null might not be available on all platforms
tmpdir = tempfile.mkdtemp()
tmpname = os.path.join(tmpdir, "temp.c")
- 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_definitions
has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring. Open
def get_definitions(self, cmake_version):
compiler = self._ss("compiler")
compiler_base = self._ss("compiler.base")
compiler_version = self._ss("compiler.version")
- 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_gnu_triplet
has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring. Open
def get_gnu_triplet(os_, arch, compiler=None):
"""
Returns string with <machine>-<vendor>-<op_system> triplet (<vendor> can be omitted in practice)
:param os_: os to be used to create the triplet
- 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_gnu_triplet
has a Cognitive Complexity of 36 (exceeds 20 allowed). Consider refactoring. Open
def _get_gnu_triplet(os_, arch, compiler=None):
"""
Returns string with <machine>-<vendor>-<op_system> triplet (<vendor> can be omitted in practice)
:param os_: os to be used to create the triplet
- 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 create
has 28 arguments (exceeds 10 allowed). Consider refactoring. Open
def create(self, conanfile_path, name=None, version=None, user=None, channel=None,
Function get_command
has a Cognitive Complexity of 35 (exceeds 20 allowed). Consider refactoring. Open
def get_command(self, project_file, props_file_path=None, targets=None, upgrade_project=True,
build_type=None, arch=None, parallel=True, toolset=None, platforms=None,
use_env=False, properties=None, output_binary_log=None, verbosity=None,
user_property_file_name=None):
- 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 _format_values
has a Cognitive Complexity of 35 (exceeds 20 allowed). Consider refactoring. Open
def _format_values(flavor, variables, append_with_spaces):
"""
Formats the values for the different supported script language flavors.
:param flavor: flavor of the execution environment
:param variables: variables to be formatted
- 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 environment_wrap_command
has a Cognitive Complexity of 35 (exceeds 20 allowed). Consider refactoring. Open
def environment_wrap_command(env_filenames, env_folder, cmd, subsystem=None,
accepted_extensions=None):
if not env_filenames:
return cmd
filenames = [env_filenames] if not isinstance(env_filenames, list) else env_filenames
- 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_default_compiler
has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring. Open
def _get_default_compiler(output):
"""
find the default compiler on the build machine
search order and priority:
1. CC and CXX environment variables are always top priority
- 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 _filter_files
has a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring. Open
def _filter_files(src, pattern, links, excludes, ignore_case, excluded_folders):
""" return a list of the files matching the patterns
The list will be relative path names wrt to the root src folder
"""
- 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 a Cognitive Complexity of 34 (exceeds 20 allowed). Consider refactoring. Open
def deps_install(app, ref_or_path, install_folder, base_folder, graph_info, remotes=None,
build_modes=None, update=False, manifest_folder=None, manifest_verify=False,
manifest_interactive=False, generators=None, no_imports=False,
create_reference=None, keep_build=False, recorder=None, lockfile_node_id=None,
is_build_require=False, add_txt_generator=True, require_overrides=None,
- 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 _filter_files
has a Cognitive Complexity of 33 (exceeds 20 allowed). Consider refactoring. Open
def _filter_files(src, pattern, excludes, ignore_case, excluded_folder):
""" return a list of the files matching the patterns
The list will be relative path names wrt to the root src folder
"""
filenames = []
- 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 install
has 25 arguments (exceeds 10 allowed). Consider refactoring. Open
def install(self, path="", name=None, version=None, user=None, channel=None,