{
  "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": []
  },
  "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
    },
    "source": [
      {
        "id": "manual",
        "kind": "manual",
        "url": "https://manpages.debian.org/unstable/uncrustify/uncrustify.1.en.html",
        "revision": "0.78.1",
        "evidence": "uncrustify [OPTIONS] [FILES]\n-c CFG\nUse the config file CFG, or defaults if CFG is set to '-'.\n-f FILE\nProcess the single file FILE, sending output to stdout or the file\n-o FILE\nRedirect output to FILE.\n--check\nDo not output the new text, instead verify that nothing changes when the\n--replace\nReplace source files (creates a backup).\n--no-backup\nReplace files, no backup. Useful if files are under source control\n-l\nLanguage override: C, CPP, D, CS, JAVA, PAWN, VALA, OC, OC+\n-q\nQuiet mode - no output on stderr (-L will override)\n"
      }
    ],
    "field": [
      {
        "id": "config",
        "label": "Config file",
        "type": "path",
        "option": [
          "-c"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "manual"
        ]
      },
      {
        "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"
        ]
      },
      {
        "id": "check",
        "label": "Check only",
        "description": "Verify nothing would change; exits non-zero otherwise.",
        "type": "boolean",
        "option": [
          "--check"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "replace",
        "label": "Replace files (with backup)",
        "type": "boolean",
        "option": [
          "--replace"
        ],
        "effect": "overwrite",
        "sources": [
          "manual"
        ]
      },
      {
        "id": "no_backup",
        "label": "Replace files (no backup)",
        "type": "boolean",
        "option": [
          "--no-backup"
        ],
        "effect": "overwrite",
        "sources": [
          "manual"
        ]
      },
      {
        "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"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet",
        "type": "boolean",
        "option": [
          "-q"
        ],
        "sources": [
          "manual"
        ]
      },
      {
        "id": "files",
        "label": "Files",
        "type": "path",
        "position": 0,
        "multiple": true,
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "manual"
        ]
      }
    ],
    "task": [
      {
        "id": "check",
        "label": "Check formatting",
        "set": {
          "check": [
            true
          ]
        },
        "lock": [
          "check"
        ],
        "fields": [
          "config",
          "files",
          "check",
          "language",
          "quiet"
        ],
        "required": [
          "config",
          "files"
        ]
      },
      {
        "id": "format-in-place",
        "label": "Format in place",
        "set": {
          "no_backup": [
            true
          ]
        },
        "fields": [
          "config",
          "files",
          "no_backup",
          "language"
        ],
        "required": [
          "config",
          "files"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "config",
          "files",
          "check",
          "no_backup"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "language",
          "replace",
          "output",
          "quiet"
        ]
      }
    ]
  }
}
