diff --git a/examples/cargo-clippy.json b/examples/cargo-clippy.json new file mode 100644 index 0000000..dc7de33 --- /dev/null +++ b/examples/cargo-clippy.json @@ -0,0 +1,73 @@ +{ + "description": "Checks a package to catch common mistakes and improve your Rust code.", + "name": "cargo clippy", + "usage": "cargo clippy [OPTIONS] [--] [...]", + "options": [ + { + "option": "--allow", + "shortcut": "-A", + "description": "Set lint allowed", + "value": "[LINT]" + }, + { + "option": "--deny", + "shortcut": "-D", + "description": "Set lint denied", + "value": "[LINT]" + }, + { + "option": "--explain", + "description": "Print the documentation for a given lint", + "value": "[LINT]" + }, + { + "option": "--fix", + "description": "Automatically apply lint suggestions. This flag implies --no-deps and --all-targets" + }, + { + "option": "--forbid", + "shortcut": "-F", + "description": "Set lint forbidden", + "value": "[LINT]" + }, + { + "option": "--frozen", + "description": "Require Cargo.lock and cache are up to date" + }, + { + "option": "--help", + "shortcut": "-h", + "description": "Print this message" + }, + { + "option": "--locked", + "description": "Require Cargo.lock is up to date" + }, + { + "option": "--manifest-path", + "description": "Path to Cargo.toml", + "value": "" + }, + { + "option": "--no-deps", + "description": "Run Clippy only on the given crate, without linting the dependencies" + }, + { + "option": "--offline", + "description": "Run without accessing the network" + }, + { + "option": "--version", + "shortcut": "-V", + "description": "Print version info and exit" + }, + { + "option": "--warn", + "shortcut": "-W", + "description": "Set lint warnings", + "value": "[LINT]" + } + ], + "subcommands": [], + "version": "0.1.90" +} diff --git a/examples/rustc.json b/examples/rustc.json new file mode 100644 index 0000000..e5f7baf --- /dev/null +++ b/examples/rustc.json @@ -0,0 +1,163 @@ +{ + "name": "rustc", + "description": "The Rust compiler.", + "usage": "Usage: rustc [OPTIONS] INPUT", + "options": [ + { + "option": "--allow", + "shortcut": "-A", + "description": "Set lint allowed", + "value": "" + }, + { + "option": "--cap-lints", + "description": "Set the most restrictive lint level. More restrictive lints are capped at this level", + "value": "" + }, + { + "option": "--cfg", + "description": "Configure the compilation environment. SPEC supports the syntax `[=\"\"]`.", + "value": "" + }, + { + "option": "--check-cfg", + "description": "Provide list of expected cfgs for checking", + "value": "" + }, + { + "option": "--codegen", + "shortcut": "-C", + "description": "Set a codegen option", + "value": "[=]" + }, + { + "option": "--crate-name", + "description": "Specify the name of the crate being built", + "value": "" + }, + { + "option": "--crate-type", + "description": "Comma separated list of types of crates for the compiler to emit", + "value": "" + }, + { + "option": "--deny", + "shortcut": "-D", + "description": "Set lint denied", + "value": "" + }, + { + "option": "--edition", + "description": "Specify which edition of the compiler to use when compiling code.", + "value": "<2015|2018|2021|2024|future>", + "default": "2015" + }, + { + "option": "--emit", + "description": "Comma separated list of types of output for the compiler to emit.", + "value": "[=]" + }, + { + "option": "--explain", + "description": "Provide a detailed explanation of an error message", + "value": "" + }, + { + "option": "--force-warn", + "description": "Set lint force-warn", + "value": "" + }, + { + "option": "--help", + "shortcut": "-h", + "description": "Display this message" + }, + { + "option": "--out-dir", + "description": "Write output to compiler-chosen filename in DIR", + "value": "" + }, + { + "option": "--print", + "description": "Compiler information to print on stdout (or to a file)", + "value": "[=]" + }, + { + "option": "--target", + "description": "Target triple for which the code is compiled", + "value": "" + }, + { + "option": "--test", + "description": "Build a test harness" + }, + { + "option": "--version", + "shortcut": "-V", + "description": "Print version info and exit" + }, + { + "option": "--verbose", + "shortcut": "-v", + "description": "Use verbose output" + }, + { + "option": "--warn", + "shortcut": "-W", + "description": "Set lint warnings", + "value": "" + }, + { + "option": "-C help", + "description": "Print codegen options", + "tags": [ + "Additional help" + ] + }, + { + "option": "-F", + "shortcut": "--forbid", + "description": "Set lint forbidden", + "value": "" + }, + { + "option": "-L", + "description": "Add a directory to the library search path. The optional KIND can be one of (default: all).", + "value": "[=]" + }, + { + "option": "-O", + "description": "Equivalent to -C opt-level=3" + }, + { + "option": "-W help", + "description": "Print 'lint' options and default settings", + "tags": [ + "Additional help" + ] + }, + { + "option": "-Z help", + "description": "Print unstable compiler options", + "tags": [ + "Additional help" + ] + }, + { + "option": "-g", + "description": "Equivalent to -C debuginfo=2" + }, + { + "option": "-l", + "description": "Link the generated crate(s) to the specified native library NAME. The optional KIND can be one of (default: dylib). Optional comma separated MODIFIERS may be specified each with a prefix of either '+' to enable or '-' to disable.", + "value": "[[:]=][:]" + }, + { + "option": "-o", + "description": "Write output to FILENAME", + "value": "" + } + ], + "subcommands": [], + "version": "1.91.0-nightly" +} diff --git a/examples/rustfmt.json b/examples/rustfmt.json new file mode 100644 index 0000000..01f4ac3 --- /dev/null +++ b/examples/rustfmt.json @@ -0,0 +1,95 @@ +{ + "name": "rustfmt", + "description": "Format Rust code", + "usage": "rustfmt [options] ...", + "options": [ + { + "option": "--backup", + "description": "Backup any modified files." + }, + { + "option": "--check", + "description": "Run in 'check' mode. Exits with 0 if input is formatted correctly. Exits with 1 and prints a diff if formatting is required." + }, + { + "option": "--color", + "description": "Use colored output (if supported)", + "value": "[always|never|auto]" + }, + { + "option": "--config", + "description": "Set options from command line. These settings take priority over .rustfmt.toml", + "value": "[key1=val1,key2=val2...]" + }, + { + "option": "--config-path", + "description": "Recursively searches the given path for the rustfmt.toml config file. If not found reverts to the input file path", + "value": "[Path for the configuration file]" + }, + { + "option": "--edition", + "description": "Rust edition to use", + "value": "[2015|2018|2021|2024]" + }, + { + "option": "--emit", + "description": "What data to emit and how", + "value": "[files|stdout|coverage|checkstyle|json]" + }, + { + "option": "--error-on-unformatted", + "description": "Error if unable to get comments or string literals within max_width, or they are left with trailing whitespaces (unstable)." + }, + { + "shortcut": "-l", + "option": "--files-with-diff", + "description": "Prints the names of mismatched files that were formatted. Prints the names of files that would be formatted when used with `--check` mode." + }, + { + "shortcut": "-h", + "option": "--help", + "description": "Show this message or help about a specific topic: `config` or `file-lines`", + "value": "[=TOPIC]" + }, + { + "option": "--file-lines", + "description": "Format specified line ranges. Run with `--help=file-lines` for more detail (unstable).", + "value": "JSON" + }, + { + "shortcut": "-q", + "option": "--quiet", + "description": "Print less output" + }, + { + "option": "--print-config", + "description": "Dumps a default or minimal config to PATH. A minimal config is the subset of the current config file used for formatting the current program. `current` writes to stdout current config as if formatting the file at PATH.", + "value": "[default|minimal|current] PATH" + }, + { + "option": "--skip-children", + "description": "Don't reformat child modules (unstable)." + }, + { + "option": "--style-edition", + "description": "The edition of the Style Guide.", + "value": "[2015|2018|2021|2024]" + }, + { + "option": "--unstable-features", + "description": "Enables unstable features. Only available on nightly channel." + }, + { + "shortcut": "-v", + "option": "--verbose", + "description": "Print verbose output" + }, + { + "shortcut": "-V", + "option": "--version", + "description": "Show version information" + } + ], + "subcommands": [], + "version": "1.8.0-nightly" +}