From 8a32a210f8493070d16d347a24cf7a263f5c7848 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Fri, 15 Nov 2019 21:38:20 +0100 Subject: [PATCH] addons: Change shebang to use Python 3 instead of Python 2 (#2361) Use Python 3 instead of Python 2 if addons are executed directly. Running cert.py and misra.py against test/cfg/std.c.dump shows that Python 3 needs only half the time compared to Python 2. I have tested it repeatedly and the results are always the same. This is no surprise at all. The memory footprint is very likely also significantly better but i have not tested it. --- addons/cert.py | 2 +- addons/findcasts.py | 2 +- addons/misc.py | 2 +- addons/misra.py | 2 +- addons/naming.py | 2 +- addons/threadsafety.py | 2 +- addons/y2038.py | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/cert.py b/addons/cert.py index 61e351de7..34454e76a 100755 --- a/addons/cert.py +++ b/addons/cert.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Cert: Some extra CERT checkers # diff --git a/addons/findcasts.py b/addons/findcasts.py index e44c94482..99f863e54 100755 --- a/addons/findcasts.py +++ b/addons/findcasts.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Locate casts in the code # diff --git a/addons/misc.py b/addons/misc.py index 84cb6c238..c739a0453 100644 --- a/addons/misc.py +++ b/addons/misc.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # Misc: Uncategorized checks that might be moved to some better addon later # diff --git a/addons/misra.py b/addons/misra.py index f3c94acad..c7903586c 100755 --- a/addons/misra.py +++ b/addons/misra.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # MISRA C 2012 checkers # diff --git a/addons/naming.py b/addons/naming.py index ca59f57b9..6037fab66 100755 --- a/addons/naming.py +++ b/addons/naming.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # cppcheck addon for naming conventions # diff --git a/addons/threadsafety.py b/addons/threadsafety.py index bbcd4bc00..3a12d6d0b 100755 --- a/addons/threadsafety.py +++ b/addons/threadsafety.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # This script analyses Cppcheck dump files to locate threadsafety issues # - warn about static local objects diff --git a/addons/y2038.py b/addons/y2038.py index 2fdbbe218..4fd586f2e 100755 --- a/addons/y2038.py +++ b/addons/y2038.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # # cppcheck addon for Y2038 safeness detection #