def main(): """ Main processing function. """ #src_olddir = libastylewx.get_astylewx_directory() + "/srcOLD" #src_newdir = libastylewx.get_astylewx_directory() + "/src" # change line 61 or 62 when the following are used src_olddir = libastylewx.get_astylewxtest_directory() + "/srcOLD" src_newdir = libastylewx.get_astylewxtest_directory() + "/src" libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) if not os.path.isdir(src_olddir): print("rename src to srcOLD") os.rename(src_newdir, src_olddir) os.mkdir(src_newdir) print("copy srcOLD to src") file_list_old = glob.glob(src_olddir + "/*") for file_path in file_list_old: shutil.copy(file_path, src_newdir) print("convert src") file_list_new = glob.glob(src_newdir + "/*") for file_path in file_list_new: process_file(file_path)
def main(): """Main processing function.""" # lists to compare virtual function overrides iface_functions = [] # functions in AStyleDlgBase.h mtest_functions = [] # functions in AStyleDlg.h # file paths iface_path = libastylewx.get_astylewx_directory() + "/src/AStyleIFace.h" mtest_path = libastylewx.get_astylewxtest_directory() + "/src/Main_Test.h" # extract data libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) print("Virtual Functions") get_iface_functions(iface_functions, iface_path) get_mtest_functions(mtest_functions, mtest_path) # find diffs find_function_diffs(iface_functions, mtest_functions) if __print_functions: # iface_functions.sort() print(iface_functions) # mtest_functions.sort() print(mtest_functions)
def main(): """Main processing function.""" # lists to compare virtual function overrides iface_functions = [] # functions in AStyleDlgBase.h mtest_functions = [] # functions in AStyleDlg.h # file paths iface_path = libastylewx.get_astylewx_directory() + "/src/AStyleIFace.h" mtest_path = libastylewx.get_astylewxtest_directory() + "/src/Main_Test.h" # extract data libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) print("Virtual Functions") get_iface_functions(iface_functions, iface_path) get_mtest_functions(mtest_functions, mtest_path) # find diffs find_function_diffs(iface_functions, mtest_functions) if __print_functions: # iface_functions.sort() print(iface_functions) # mtest_functions.sort() print(mtest_functions)
# local libraries import libastylewx # global variables ------------------------------------------------------------ # release number for distribution file AS_RELEASE = "2.7" # extract all platforms for testing (Windows, Linux, Mac) #EXTRACT_ALL = False EXTRACT_ALL = True # inut from AStyleWx directory __astylewx_dir = libastylewx.get_astylewx_directory() # inut from AStyleWxTest directory __astylewxtest_dir = libastylewx.get_astylewxtest_directory() # inut from AStyle directory __astyle_dir = libastylewx.get_astyle_directory() # output to Project directory __base_dir = libastylewx.get_project_directory() # ----------------------------------------------------------------------------- def main(): """Main processing function. """ libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) os.chdir(libastylewx.get_file_py_directory()) remove_dist_directories()
""" # to disable the print statement and use the print() function (version 3 format) from __future__ import print_function import os import platform import subprocess # local libraries import libastylewx # global variables ------------------------------------------------------------ __expected_version = "1.74" __src_dir = libastylewx.get_astylewx_directory() + "/src/" __py_dir = libastylewx.get_astylewxtest_directory() + "/file-py/" __suppression_path = __py_dir + "cppcheck-suppress" # ----------------------------------------------------------------------------- def main(): """Main processing function. """ generate_suppression_file() run_cppcheck() # ----------------------------------------------------------------------------- def generate_suppression_file(): """Generate the suppression file. """
# local libraries import libastylewx # global variables ------------------------------------------------------------ # release number for distribution file AS_RELEASE = "3.1" # extract all platforms for testing (Windows, Linux, Mac) EXTRACT_ALL = False #EXTRACT_ALL = True # inut from AStyleWx directory __astylewx_dir = libastylewx.get_astylewx_directory() # inut from AStyleWxTest directory __astylewxtest_dir = libastylewx.get_astylewxtest_directory() # inut from AStyle directory __astyle_dir = libastylewx.get_astyle_directory() # output to Project directory __base_dir = libastylewx.get_project_directory() # ----------------------------------------------------------------------------- def main(): """Main processing function. """ libastylewx.set_text_color("yellow") print(libastylewx.get_python_version()) os.chdir(libastylewx.get_file_py_directory()) remove_dist_directories() if EXTRACT_ALL and os.name == "nt":