Skip to content

Commit 747cb0a

Browse files
committed
mitigated pylint warnings
1 parent e87c5d6 commit 747cb0a

4 files changed

Lines changed: 9 additions & 6 deletions

File tree

addons/cppcheckdata.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -677,7 +677,7 @@ def __init__(self, element, nestedIn):
677677
self.argumentId = {}
678678

679679
def __repr__(self):
680-
attrs = ["Id", "tokenId", "tokenDefId", "name", "type", "hasVirtualSpecifier",
680+
attrs = ["Id", "tokenId", "tokenDefId", "name", "type", "hasVirtualSpecifier",
681681
"isImplicitlyVirtual", "access", "isInlineKeyword", "isStatic",
682682
"isAttributeNoreturn", "overriddenFunction", "nestedIn", "argumentId"]
683683
return "{}({})".format(
@@ -901,7 +901,7 @@ def setId(self, IdMap):
901901
self.symbolic = IdMap.get(self._symbolicId)
902902

903903
def __repr__(self):
904-
attrs = ["intvalue", "tokvalue", "floatvalue", "movedvalue", "uninit",
904+
attrs = ["intvalue", "tokvalue", "floatvalue", "movedvalue", "uninit",
905905
"bufferSize", "containerSize", "condition", "valueKind"]
906906
return "{}({})".format(
907907
"Value",
@@ -999,7 +999,7 @@ def isMatch(self, file, line, message, errorId):
999999
return True
10001000
# Other Suppression (Globaly set via suppression file or cli command)
10011001
if ((self.fileName is None or fnmatch(file, self.fileName))
1002-
and (self.suppressionType is None)
1002+
and (self.suppressionType is None)
10031003
and (self.symbolName is None or fnmatch(message, '*'+self.symbolName+'*'))
10041004
and fnmatch(errorId, self.errorId)):
10051005
return True

addons/misra.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2105,7 +2105,7 @@ def misra_8_4(self, cfg):
21052105
else:
21062106
self.insert_in_dict(extern_var_without_def, tok.str, tok)
21072107
else:
2108-
self.insert_in_dict(extern_var_without_def, var.nameToken.str, var.nameToken)
2108+
self.insert_in_dict(extern_var_without_def, var.nameToken.str, var.nameToken)
21092109

21102110
for var in extern_var_with_def:
21112111
if var not in extern_var_without_def:

addons/namingng.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ def check_include_guards(conf,cfg,unguarded_include_files):
200200
# - test whether include guards are in place
201201
max_linenr = conf.include_guard.get('max_linenr', 5)
202202

203-
def report(directive,msg,errorId,column=0):
204-
reportNamingError(directive,msg,errorId,column=column)
203+
def report(directive,msg,errorId,severity='style',column=0):
204+
reportNamingError(directive,msg,errorId,severity=severity,column=column)
205205

206206
def report_pending_ifndef(directive,column):
207207
report(directive,'include guard #ifndef is not followed by #define','includeGuardIncomplete',column=column)
@@ -266,8 +266,10 @@ def report_pending_ifndef(directive,column):
266266
def process(dumpfiles, configfile):
267267
conf = loadConfig(configfile)
268268

269+
# pylint: disable-next=no-member - TODO: fix this
269270
if conf.include_guard:
270271
global include_guard_header_re
272+
# pylint: disable-next=no-member - TODO: fix this
271273
include_guard_header_re = conf.include_guard.get('RE_HEADERFILE',"[^/].*\\.h\\Z")
272274

273275
for afile in dumpfiles:

htmlreport/cppcheck-htmlreport

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ def git_blame(errors, path, file, blame_options):
422422
full_path = os.path.join(path, file)
423423
path, filename = os.path.split(full_path)
424424

425+
cwd = os.getcwd()
425426
if path:
426427
os.chdir(path)
427428

0 commit comments

Comments
 (0)