id = "uncrustify" name = "Uncrustify" homepage = "https://github.com/uncrustify/uncrustify" description = "A source code beautifier for C, C++, C#, D, Java and Pawn." executables = ["uncrustify"] [dotfiles] paths = ["~/.uncrustify.cfg"] secret = [] # Uncrustify's official man page and README specify ~/.uncrustify.cfg as the # fallback per-user configuration file when no -c argument is supplied. # https://github.com/uncrustify/uncrustify/blob/master/man/uncrustify.1.in [commands] format = 1 label = "Format source files" description = "Formats C, C++, C#, D, Java, Objective-C, Pawn and Vala source with an Uncrustify config. Debug and config-generation options are not included." quality = "ai-draft" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = false, short_bundles = false } [[commands.source]] id = "manual" kind = "manual" url = "https://manpages.debian.org/unstable/uncrustify/uncrustify.1.en.html" revision = "0.78.1" evidence = """ uncrustify [OPTIONS] [FILES] -c CFG Use the config file CFG, or defaults if CFG is set to '-'. -f FILE Process the single file FILE, sending output to stdout or the file -o FILE Redirect output to FILE. --check Do not output the new text, instead verify that nothing changes when the --replace Replace source files (creates a backup). --no-backup Replace files, no backup. Useful if files are under source control -l Language override: C, CPP, D, CS, JAVA, PAWN, VALA, OC, OC+ -q Quiet mode - no output on stderr (-L will override) """ [[commands.field]] id = "config" label = "Config file" type = "path" option = ["-c"] path = { kind = "file", role = "input", must_exist = true } sources = ["manual"] [[commands.field]] id = "language" label = "Language override" description = "Required when reading from standard input." type = "enum" option = ["-l"] choices = [{ value = "C", label = "C" }, { value = "CPP", label = "C++" }, { value = "D", label = "D" }, { value = "CS", label = "C#" }, { value = "JAVA", label = "Java" }, { value = "PAWN", label = "Pawn" }, { value = "VALA", label = "Vala" }, { value = "OC", label = "Objective-C" }, { value = "OC+", label = "Objective-C++" }] sources = ["manual"] [[commands.field]] id = "check" label = "Check only" description = "Verify nothing would change; exits non-zero otherwise." type = "boolean" option = ["--check"] sources = ["manual"] [[commands.field]] id = "replace" label = "Replace files (with backup)" type = "boolean" option = ["--replace"] effect = "overwrite" sources = ["manual"] [[commands.field]] id = "no_backup" label = "Replace files (no backup)" type = "boolean" option = ["--no-backup"] effect = "overwrite" sources = ["manual"] [[commands.field]] id = "output" label = "Output file" description = "Only valid with a single input file." type = "path" option = ["-o"] path = { kind = "file", role = "output" } effect = "overwrite" sources = ["manual"] [[commands.field]] id = "quiet" label = "Quiet" type = "boolean" option = ["-q"] sources = ["manual"] [[commands.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "file", role = "input", must_exist = true } sources = ["manual"] [[commands.task]] id = "check" label = "Check formatting" set = { check = [true] } lock = ["check"] fields = ["config", "files", "check", "language", "quiet"] required = ["config", "files"] [[commands.task]] id = "format-in-place" label = "Format in place" set = { no_backup = [true] } fields = ["config", "files", "no_backup", "language"] required = ["config", "files"] [[commands.group]] id = "basic" label = "Basic" fields = ["config", "files", "check", "no_backup"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["language", "replace", "output", "quiet"]