def set_astyle_args(filepath, excludes, index): """Set args for calling artistic style. """ global __options_x # set astyle executable args = [libastyle.get_astyleexe_path(get_astyle_config())] # set filepaths for file_in in filepath: args.append(file_in) # set options - must create a backup file args.append("-vRQ") modified_options = get_modified_options(index) if len(modified_options) > 0: args.append(modified_options) # options_x if len(__options_x) > 0: __options_x = __options_x.strip() if len(__options_x) > 0 and __options_x[0] != '-': __options_x = '-' + __options_x args.append(__options_x) brace_option = get_brace_option(index) if brace_option != '': args.append('-' + brace_option) # set excludes for exclude in excludes: args.append(exclude) return args
def set_astyle_args(filepath, excludes, brackets, index): """Set args for calling artistic style. """ # set astyle executable args = [libastyle.get_astyleexe_path(get_astyle_config())] # set filepaths for file in filepath: args.append(file) # set options if len(options) > 0: args.append(options) args.append("-vRQ") if brackets[index] != '_': args.append('-' + brackets[index]) # set excludes for exclude in excludes: args.append(exclude) return args
def set_astyle_args(filepath, excludes, brackets, index): """Set args for calling artistic style. """ # set astyle executable args = [libastyle.get_astyleexe_path(get_astyle_config())] # set filepaths for file_in in filepath: args.append(file_in) # set options args.append("-vRQ") if len(__options) > 0: args.append(__options) if len(__options_x.strip()) > 0: if __options_x[0] != '-': libastyle.system_exit("options_x must begin with a '-'") args.append(__options_x) if brackets[index] != '_': args.append('-' + brackets[index]) # set excludes for exclude in excludes: args.append(exclude) return args
def set_astyle_args(filepath, excludes, brackets, index): """Set args for calling artistic style. """ # set astyle executable args = [libastyle.get_astyleexe_path(get_astyle_config())] # set filepaths for file in filepath: args.append(file) # set options if len(options) > 0: args.append(options) args.append("-vRQ") if brackets[index] != '_': args.append('-' + brackets[index]) if len(optionsX.strip()) > 0: if optionsX[0] != '-': libastyle.system_exit("optionsX must begin with a '-'") args.append(optionsX) # set excludes for exclude in excludes: args.append(exclude) return args
def set_astyle_args(filepath, excludes, brackets, index): """Set args for calling artistic style. """ # set astyle executable args = [libastyle.get_astyleexe_path(get_astyle_config())] # set filepaths for file_in in filepath: args.append(file_in) # set options - must create a backup file args.append("-vRQ") if len(__options) > 0: args.append(__options) if len(__options_x.strip()) > 0: if __options_x[0] != '-': libastyle.system_exit("options_x must begin with a '-'") args.append(__options_x) bracket_option = get_bracket_option(index) if bracket_option != '': args.append('-' + bracket_option) # set excludes for exclude in excludes: args.append(exclude) return args
def set_astyle_args(filepath, excludes, index): """Set args for calling artistic style. """ # set astyle executable args = [libastyle.get_astyleexe_path(get_astyle_config())] # set filepaths for file_in in filepath: args.append(file_in) # set options - must create a backup file args.append("-vRQ") modified_options = get_modified_options(index) if len(modified_options) > 0: args.append(modified_options) if len(__options_x.strip()) > 0: if __options_x[0] != '-': libastyle.system_exit("options_x must begin with a '-'") args.append(__options_x) bracket_option = get_bracket_option(index) if bracket_option != '': args.append('-' + bracket_option) # set excludes for exclude in excludes: args.append(exclude) return args