MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / get_libraries

Method get_libraries

tools/donate_cpu_lib.py:747–766  ·  view source on GitHub ↗
(self, folder)

Source from the content-addressed store, hash-verified

745 pass
746
747 def get_libraries(self, folder):
748 print('Detecting library usage...')
749 libraries = ['posix', 'gnu', 'bsd']
750
751 # explicitly copy as assignments in python are references
752 library_includes_re = copy.copy(self.__library_includes_re)
753
754 def has_include(filedata):
755 lib_del = []
756 for library, includes_re in library_includes_re.items():
757 if includes_re.search(filedata):
758 libraries.append(library)
759 lib_del.append(library)
760
761 for lib_d in lib_del:
762 del library_includes_re[lib_d]
763
764 self.__iterate_files(folder, has_include)
765 print('Found libraries: {}'.format(libraries))
766 return libraries
767
768
769def get_compiler_version():

Callers 4

_test_library_includesFunction · 0.95
test-my-pr.pyFile · 0.80
donate-cpu.pyFile · 0.80

Calls 3

__iterate_filesMethod · 0.95
formatMethod · 0.80
copyMethod · 0.45

Tested by 1

_test_library_includesFunction · 0.76