Showing 2,859 of 2,859 total issues
Avoid deeply nested control flow statements. Open
for output in concrete_outputs_for_this_rule_source:
AddResourceToTarget(output, pbxp, xct)
# Do we have a message to print when this rule runs?
message = rule.get('message')
Avoid deeply nested control flow statements. Open
for output in concrete_outputs_for_this_rule_source:
AddSourceToTarget(output, type, pbxp, xct)
# If the file came from the mac_bundle_resources list or if the rule
# is marked to process outputs as bundle resource, do so.
Avoid deeply nested control flow statements. Open
for prerequisite_index in xrange(0, len(prerequisites)):
prerequisite = prerequisites[prerequisite_index]
if prerequisite_index == len(prerequisites) - 1:
eol = ''
else:
Function WriteLinkForArch
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def WriteLinkForArch(self, ninja_file, spec, config_name, config,
Function SelectVisualStudioVersion
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def SelectVisualStudioVersion(version='auto'):
"""Select which version of Visual Studio projects to generate.
Arguments:
version: Hook to allow caller to force a particular version (vs auto).
- 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 ResolveTarget
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def ResolveTarget(build_file, target, toolset):
# This function resolves a target into a canonical form:
# - a fully defined build file, either absolute or relative to the current
# directory
# - a target 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"
Further reading
Avoid deeply nested control flow statements. Open
if int(dependency_target_dict.get('suppress_wildcard', False)):
continue
dependency_target_name = dependency_target_dict['target_name']
Function _GetAndMunge
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _GetAndMunge(self, field, path, default, prefix, append, map):
Avoid deeply nested control flow statements. Open
if (dependency_toolset != '*' and
dependency_toolset != dependency_target_toolset):
continue
dependency = gyp.common.QualifiedTarget(dependency_build_file,
Function _GetLdManifestFlags
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _GetLdManifestFlags(self, config, name, gyp_to_build_path,
Function Children
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def Children(self):
"""Returns a list of all of this object's owned (strong) children."""
children = []
for property, attributes in self._schema.iteritems():
- 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 AddCustomBuildRule
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def AddCustomBuildRule(self, name, cmd, description,
Avoid deeply nested control flow statements. Open
if exclude_item == the_list[index]:
# This item matches the exclude_item, so set its action to 0
# (exclude).
list_actions[index] = 0
Function _DoRemapping
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _DoRemapping(element, map):
"""If |element| then remap it through |map|. If |element| is iterable then
each item will be remapped. Any elements not found will be removed."""
if map is not None and element is not None:
if not callable(map):
- 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 _FindDirectXInstallation
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _FindDirectXInstallation():
"""Try to find an installation location for the DirectX SDK. Check for the
standard environment variable, and if that doesn't exist, try to find
via the registry. May return None if not found in either location."""
# Return previously calculated value, if there is one
- 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 MergeLists
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def MergeLists(to, fro, to_file, fro_file, is_paths=False, append=True):
Avoid deeply nested control flow statements. Open
if build_file_dir: # build_file_dir may be None (see above).
os.chdir(build_file_dir)
try:
Avoid deeply nested control flow statements. Open
if t == target_name:
if targets[t].get('variables', {}).get('prune_self_dependency', 0):
target_dict[dependency_key] = Filter(dependencies, target_name)
Avoid deeply nested control flow statements. Open
for item in value:
self._properties[property].append(item.Copy())
else:
Function LoadBuildFileIncludesIntoList
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def LoadBuildFileIncludesIntoList(sublist, sublist_path, data, aux_data,