Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ disable=
consider-using-with,
too-many-statements,
too-many-branches,
use-list-literal,
simplifiable-if-statement,
too-many-locals,
too-many-arguments,
Expand All @@ -65,7 +64,6 @@ disable=
too-many-nested-blocks,
too-many-public-methods,
consider-using-sys-exit,
use-dict-literal,
chained-comparison,
too-many-instance-attributes,
consider-using-join,
Expand Down
6 changes: 3 additions & 3 deletions addons/cppcheckdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,14 +588,14 @@ def __init__(self, element):
self.bodyEnd = None
self.nestedInId = element.get('nestedIn')
self.nestedIn = None
self.nestedList = list()
self.nestedList = []
self.type = element.get('type')
self.definedType = element.get('definedType')
self.isExecutable = (self.type in ('Function', 'If', 'Else', 'For', 'While', 'Do',
'Switch', 'Try', 'Catch', 'Unconditional', 'Lambda'))

self.varlistId = list()
self.varlist = list()
self.varlistId = []
self.varlist = []

def __repr__(self):
attrs = ["Id", "className", "functionId", "bodyStartId", "bodyEndId",
Expand Down
24 changes: 12 additions & 12 deletions addons/misra.py
Original file line number Diff line number Diff line change
Expand Up @@ -1367,17 +1367,17 @@ def __init__(self, settings, stdversion="c89"):
self.settings = settings

# Test validation rules lists
self.verify_expected = list()
self.verify_actual = list()
self.verify_expected = []
self.verify_actual = []

# List of formatted violation messages
self.violations = dict()
self.violations = {}

# if --rule-texts is specified this dictionary
# is loaded with descriptions of each rule
# by rule number (in hundreds).
# ie rule 1.2 becomes 102
self.ruleTexts = dict()
self.ruleTexts = {}
self.ruleText_filename = None

# Dictionary of dictionaries for rules to suppress
Expand All @@ -1388,13 +1388,13 @@ def __init__(self, settings, stdversion="c89"):
# or an item of None which indicates suppress rule for the entire file.
# The line and symbol name tuple may have None as either of its elements but
# should not be None for both.
self.suppressedRules = dict()
self.suppressedRules = {}

# Prefix to ignore when matching suppression files.
self.filePrefix = None

# Number of all violations suppressed per rule
self.suppressionStats = dict()
self.suppressionStats = {}

self.stdversion = stdversion

Expand Down Expand Up @@ -1588,7 +1588,7 @@ def misra_2_4(self, dumpfile, cfg):
self._save_ctu_summary_tagnames(dumpfile, cfg)

def misra_2_5(self, dumpfile, cfg):
used_macros = list()
used_macros = []
for m in cfg.macro_usage:
used_macros.append(m.name)
summary = []
Expand All @@ -1606,7 +1606,7 @@ def misra_2_7(self, data):
if len(func.argument) == 0:
continue
# Setup list of function parameters
func_param_list = list()
func_param_list = []
for arg in func.argument:
func_arg = func.argument[arg]
if func_arg.typeStartToken and func_arg.typeStartToken.str == '...':
Expand Down Expand Up @@ -4124,10 +4124,10 @@ def addSuppressedRule(self, ruleNum,

# If the rule is not in the dict already then add it
if ruleNum not in self.suppressedRules:
ruleItemList = list()
ruleItemList = []
ruleItemList.append(line_symbol)

fileDict = dict()
fileDict = {}
fileDict[normalized_filename] = ruleItemList

self.suppressedRules[ruleNum] = fileDict
Expand All @@ -4143,7 +4143,7 @@ def addSuppressedRule(self, ruleNum,

# If the filename is not in the dict already add it
if normalized_filename not in fileDict:
ruleItemList = list()
ruleItemList = []
ruleItemList.append(line_symbol)

fileDict[normalized_filename] = ruleItemList
Expand Down Expand Up @@ -4247,7 +4247,7 @@ def showSuppressedRules(self):
Print out rules in suppression list sorted by Rule Number
"""
print("Suppressed Rules List:")
outlist = list()
outlist = []

for ruleNum in self.suppressedRules:
fileDict = self.suppressedRules[ruleNum]
Expand Down
2 changes: 1 addition & 1 deletion htmlreport/cppcheck-htmlreport
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,7 @@ def git_blame(errors, path, file, blame_options):
blame_data = []
line_from = 0
line_to = 0
blame_info = dict()
blame_info = {}

for line_str in result.splitlines():
field, _, value = line_str.partition(' ')
Expand Down
2 changes: 1 addition & 1 deletion tools/compare-normal-exhaustive.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def format_float(a, b=1):
print("No files to process")
continue

results_to_diff = list()
results_to_diff = []

normal_crashed = False
exhaustive_crashed = False
Expand Down
2 changes: 1 addition & 1 deletion tools/test-my-pr.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def format_float(a, b=1):
print("No files to process")
continue

results_to_diff = list()
results_to_diff = []

main_crashed = False
your_crashed = False
Expand Down