Allow per project misra.py addon (#1241)
Use python's __file__ variable to figure out where the checker script is located. This allows a customized per project scripts to be used instead of the one provided in the cppcheck release.
This commit is contained in:
parent
a26d73f78f
commit
672d0433a4
|
@ -1455,7 +1455,7 @@ def generateTable():
|
||||||
# what rules are handled by this addon?
|
# what rules are handled by this addon?
|
||||||
addon = []
|
addon = []
|
||||||
compiled = re.compile(r'[ ]+misra_([0-9]+)_([0-9]+)[(].*')
|
compiled = re.compile(r'[ ]+misra_([0-9]+)_([0-9]+)[(].*')
|
||||||
for line in open('misra.py'):
|
for line in open('__file__'):
|
||||||
res = compiled.match(line)
|
res = compiled.match(line)
|
||||||
if res is None:
|
if res is None:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue