Showing 9,525 of 13,510 total issues
Function patch
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def patch():
global vol_address
global vol_size
print 'Patching volume'
Function patch
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def patch():
global vol_address
global vol_size
print 'Patching volume'
File bgenGenerator.py
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
from bgenOutput import *
from bgenType import *
from bgenVariable import *
File rcslib.py
has 253 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""RCS interface module.
Defines the class RCS, which represents a directory with rcs version
files and (possibly) corresponding work files.
File firmware_volume.py
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
#
# Copyright (c) 2011-2013, ARM Limited. All rights reserved.
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
File astgen.py
has 252 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"""Generate ast module from specification
This script generates the ast module from a simple specification,
which makes it easy to accomodate changes in the grammar. This
approach would be quite reasonable if the grammar changed often.
Consider simplifying this complex logical expression. Open
Open
if self.__CurrentChar() == T_CHAR_LF:
self.CurrentLineNumber += 1
self.CurrentOffsetWithinLine = 0
if InComment and DoubleSlashComment:
InComment = False
Consider simplifying this complex logical expression. Open
Open
if self.__CurrentChar() == T_CHAR_LF:
self.CurrentLineNumber += 1
self.CurrentOffsetWithinLine = 0
if InComment and DoubleSlashComment:
InComment = False
Function _Init
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _Init(self, WorkspaceDir, ActivePlatform, Target, Toolchain, ArchList, MetaFileDb,
Consider simplifying this complex logical expression. Open
Open
if LA106 == 58:
LA106_2 = self.input.LA(2)
if (self.synpred33()) :
alt106 = 1
Consider simplifying this complex logical expression. Open
Open
if LA106 == 58:
LA106_2 = self.input.LA(2)
if (self.synpred33()) :
alt106 = 1
Function __init__
has 16 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(self, ID = -1, Header = '', Modifier = '', Name = '', ReturnStatement = '', \
Consider simplifying this complex logical expression. Open
Open
if (not skipkeys and ensure_ascii and
check_circular and allow_nan and
cls is None and indent is None and separators is None and
encoding == 'utf-8' and default is None and not kw):
return _default_encoder.encode(obj)
Consider simplifying this complex logical expression. Open
Open
if (not skipkeys and ensure_ascii and
check_circular and allow_nan and
cls is None and indent is None and separators is None and
encoding == 'utf-8' and default is None and not kw):
iterable = _default_encoder.iterencode(obj)
Function parse_graminit_c
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parse_graminit_c(self, filename):
"""Parse the .c file written by pgen. (Internal)
The file looks as follows. The first two lines are always this:
Consider simplifying this complex logical expression. Open
Open
if (not skipkeys and ensure_ascii and
check_circular and allow_nan and
cls is None and indent is None and separators is None and
encoding == 'utf-8' and default is None and not kw):
return _default_encoder.encode(obj)
Consider simplifying this complex logical expression. Open
Open
if (not skipkeys and ensure_ascii and
check_circular and allow_nan and
cls is None and indent is None and separators is None and
encoding == 'utf-8' and default is None and not kw):
iterable = _default_encoder.iterencode(obj)
Function parse_graminit_c
has 50 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
def parse_graminit_c(self, filename):
"""Parse the .c file written by pgen. (Internal)
The file looks as follows. The first two lines are always this:
Function __GetFilePart
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
def __GetFilePart(self, FfsFileObj, MacroDict = {}):
self.__GetFileOpts( FfsFileObj)
if not self.__IsToken("{"):
- 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 GetFiles
has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring. Open
Open
def GetFiles(Root, SkipList=None, FullPath = True):
OriPath = Root
FileList = []
for Root, Dirs, Files in os.walk(Root):
if SkipList:
- 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"