cppcheck-py 2.19.0__py3-none-win_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. cppcheck/__init__.py +55 -0
  2. cppcheck/cppcheck-2.19.0.tar.gz +0 -0
  3. cppcheck/data/addons/__init__.py +0 -0
  4. cppcheck/data/addons/cppcheck.py +41 -0
  5. cppcheck/data/addons/cppcheckdata.py +1727 -0
  6. cppcheck/data/addons/findcasts.py +32 -0
  7. cppcheck/data/addons/misc.py +163 -0
  8. cppcheck/data/addons/misra.py +5153 -0
  9. cppcheck/data/addons/misra_9.py +559 -0
  10. cppcheck/data/addons/naming.py +92 -0
  11. cppcheck/data/addons/namingng.py +420 -0
  12. cppcheck/data/addons/runaddon.py +16 -0
  13. cppcheck/data/addons/threadsafety.py +350 -0
  14. cppcheck/data/addons/y2038.py +602 -0
  15. cppcheck/data/cfg/avr.cfg +402 -0
  16. cppcheck/data/cfg/bento4.cfg +142 -0
  17. cppcheck/data/cfg/boost.cfg +1284 -0
  18. cppcheck/data/cfg/bsd.cfg +567 -0
  19. cppcheck/data/cfg/cairo.cfg +89 -0
  20. cppcheck/data/cfg/cppcheck-lib.cfg +72 -0
  21. cppcheck/data/cfg/cppunit.cfg +48 -0
  22. cppcheck/data/cfg/dpdk.cfg +11 -0
  23. cppcheck/data/cfg/embedded_sql.cfg +4 -0
  24. cppcheck/data/cfg/emscripten.cfg +108 -0
  25. cppcheck/data/cfg/ginac.cfg +12848 -0
  26. cppcheck/data/cfg/gnu.cfg +1738 -0
  27. cppcheck/data/cfg/googletest.cfg +62 -0
  28. cppcheck/data/cfg/gtk.cfg +23082 -0
  29. cppcheck/data/cfg/icu.cfg +221 -0
  30. cppcheck/data/cfg/kde.cfg +92 -0
  31. cppcheck/data/cfg/libcerror.cfg +203 -0
  32. cppcheck/data/cfg/libcurl.cfg +487 -0
  33. cppcheck/data/cfg/libsigc++.cfg +36 -0
  34. cppcheck/data/cfg/lua.cfg +316 -0
  35. cppcheck/data/cfg/mfc.cfg +271 -0
  36. cppcheck/data/cfg/microsoft_atl.cfg +40 -0
  37. cppcheck/data/cfg/microsoft_sal.cfg +490 -0
  38. cppcheck/data/cfg/microsoft_unittest.cfg +20 -0
  39. cppcheck/data/cfg/motif.cfg +318 -0
  40. cppcheck/data/cfg/nspr.cfg +38 -0
  41. cppcheck/data/cfg/ntl.cfg +6907 -0
  42. cppcheck/data/cfg/opencv2.cfg +132 -0
  43. cppcheck/data/cfg/opengl.cfg +581 -0
  44. cppcheck/data/cfg/openmp.cfg +157 -0
  45. cppcheck/data/cfg/openssl.cfg +174 -0
  46. cppcheck/data/cfg/pcre.cfg +165 -0
  47. cppcheck/data/cfg/posix.cfg +6445 -0
  48. cppcheck/data/cfg/protobuf.cfg +10 -0
  49. cppcheck/data/cfg/python.cfg +674 -0
  50. cppcheck/data/cfg/qt.cfg +5502 -0
  51. cppcheck/data/cfg/ruby.cfg +142 -0
  52. cppcheck/data/cfg/sdl.cfg +354 -0
  53. cppcheck/data/cfg/selinux.cfg +3621 -0
  54. cppcheck/data/cfg/sfml.cfg +301 -0
  55. cppcheck/data/cfg/sqlite3.cfg +1571 -0
  56. cppcheck/data/cfg/std.cfg +9205 -0
  57. cppcheck/data/cfg/tinyxml2.cfg +37 -0
  58. cppcheck/data/cfg/vcl.cfg +4 -0
  59. cppcheck/data/cfg/windows.cfg +17237 -0
  60. cppcheck/data/cfg/wxsqlite3.cfg +1955 -0
  61. cppcheck/data/cfg/wxsvg.cfg +16905 -0
  62. cppcheck/data/cfg/wxwidgets.cfg +17245 -0
  63. cppcheck/data/cfg/zephyr.cfg +113 -0
  64. cppcheck/data/cfg/zlib.cfg +1450 -0
  65. cppcheck/data/cppcheck-htmlreport +1157 -0
  66. cppcheck/data/cppcheck.exe +0 -0
  67. cppcheck/data/platforms/aix_ppc64.xml +18 -0
  68. cppcheck/data/platforms/arm32-wchar_t2.xml +18 -0
  69. cppcheck/data/platforms/arm32-wchar_t4.xml +18 -0
  70. cppcheck/data/platforms/arm64-wchar_t2.xml +18 -0
  71. cppcheck/data/platforms/arm64-wchar_t4.xml +18 -0
  72. cppcheck/data/platforms/avr8.xml +18 -0
  73. cppcheck/data/platforms/cray_sv1.xml +18 -0
  74. cppcheck/data/platforms/elbrus-e1cp.xml +18 -0
  75. cppcheck/data/platforms/mips32.xml +18 -0
  76. cppcheck/data/platforms/msp430_eabi_large_datamodel.xml +18 -0
  77. cppcheck/data/platforms/pic16.xml +18 -0
  78. cppcheck/data/platforms/pic8-enhanced.xml +18 -0
  79. cppcheck/data/platforms/pic8.xml +18 -0
  80. cppcheck_py-2.19.0.dist-info/METADATA +76 -0
  81. cppcheck_py-2.19.0.dist-info/RECORD +84 -0
  82. cppcheck_py-2.19.0.dist-info/WHEEL +5 -0
  83. cppcheck_py-2.19.0.dist-info/entry_points.txt +4 -0
  84. cppcheck_py-2.19.0.dist-info/licenses/LICENSE.md +191 -0
cppcheck/__init__.py ADDED
@@ -0,0 +1,55 @@
1
+ import functools
2
+ import os
3
+ import subprocess
4
+ import sys
5
+ from importlib.resources import files
6
+ from pathlib import Path
7
+
8
+
9
+ def get_executable(name: str) -> Path:
10
+ return _get_executable(name)
11
+
12
+
13
+ @functools.cache
14
+ def _get_executable(name: str) -> Path:
15
+ possibles = [
16
+ Path(files("cppcheck") / f"data/{name}{s}")
17
+ for s in ("", ".exe", ".bin", ".dmg")
18
+ ]
19
+ for exe in possibles:
20
+ if exe.exists():
21
+ if os.environ.get("CPPCHECK_WHEEL_VERBOSE", None):
22
+ print(f"Found binary: {exe}")
23
+ return exe
24
+
25
+ possibles_str = "\n\t".join(map(str, possibles))
26
+ raise FileNotFoundError(f"No executable found for {name} at\n\t{possibles_str}")
27
+
28
+
29
+ def _run(name, *args):
30
+ command = [_get_executable(name)]
31
+ if args:
32
+ command += list(args)
33
+ else:
34
+ command += sys.argv[1:]
35
+ return subprocess.call(command)
36
+
37
+
38
+ def _run_python(name, *args):
39
+ command = [sys.executable, _get_executable(name)]
40
+ if args:
41
+ command += list(args)
42
+ else:
43
+ command += sys.argv[1:]
44
+
45
+ # as MS Windows is not able to run Python scripts directly by name,
46
+ # we have to call the interpreter and pass the script as parameter
47
+ return subprocess.call(command)
48
+
49
+
50
+ def cppcheck():
51
+ raise SystemExit(_run("cppcheck"))
52
+
53
+
54
+ def cppcheck_htmlreport():
55
+ raise SystemExit(_run_python("cppcheck-htmlreport"))
Binary file
File without changes
@@ -0,0 +1,41 @@
1
+
2
+ import cppcheckdata
3
+ import sys
4
+ import os
5
+
6
+ __checkers__ = []
7
+
8
+ def checker(f):
9
+ __checkers__.append(f)
10
+ return f
11
+
12
+
13
+ __errorid__ = ''
14
+ __addon_name__ = ''
15
+ def reportError(location, severity, message, errorId=None):
16
+ cppcheckdata.reportError(location, severity, message, __addon_name__, errorId or __errorid__)
17
+
18
+ def runcheckers():
19
+ # If there are no checkers then don't run
20
+ if len(__checkers__) == 0:
21
+ return
22
+ global __addon_name__
23
+ global __errorid__
24
+ addon = sys.argv[0]
25
+ parser = cppcheckdata.ArgumentParser()
26
+ args = parser.parse_args()
27
+
28
+ __addon_name__ = os.path.splitext(os.path.basename(addon))[0]
29
+
30
+ for dumpfile in args.dumpfile:
31
+ if not args.quiet:
32
+ print('Checking %s...' % dumpfile)
33
+
34
+ data = cppcheckdata.CppcheckData(dumpfile)
35
+
36
+ for cfg in data.iterconfigurations():
37
+ if not args.quiet:
38
+ print('Checking %s, config %s...' % (dumpfile, cfg.name))
39
+ for c in __checkers__:
40
+ __errorid__ = c.__name__
41
+ c(cfg, data)